• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wp-graphql / wp-graphql-woocommerce / 11714183904

07 Nov 2024 12:23AM UTC coverage: 83.665% (-0.8%) from 84.451%
11714183904

push

github

web-flow
devops: Name officially changed to "WPGraphQL for WooCommerce" (#900)

* devops: Name officially changed to "WPGraphQL for WooCommerce"

* devops: GA workflow environment updated

* devops: GA workflow environment updated

* devops: composer-git-hooks downgraded to "2.8.5"

* devops: Unstable session manager tests skipped

* chore: cleanup applied

* devops: Docker configurations updated

* devops: Docker configurations updated

* devops: Docker configurations updated

* devops: Docker configurations updated

* devops: Docker configurations updated

2 of 8 new or added lines in 5 files covered. (25.0%)

268 existing lines in 20 files now uncovered.

12431 of 14858 relevant lines covered (83.67%)

71.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/includes/data/connection/trait-wc-db-loader-common.php
1
<?php
2
/**
3
 * Defines generic functions for to be used in connections that process creates using the Db Loader.
4
 *
5
 * @package WPGraphQL\WooCommerce\Data\Connection
6
 * @since 0.5.0
7
 */
8

9
namespace WPGraphQL\WooCommerce\Data\Connection;
10

11
/**
12
 * Trait WC_Db_Loader_Common
13
 */
14
trait WC_Db_Loader_Common {
15
        /**
16
         * Given an offset and prefix, a cursor is returned
17
         *
18
         * @param string         $prefix Salt.
19
         * @param string|integer $offset Connection offset.
20
         *
21
         * @return string
22
         */
23
        public function offset_to_cursor( $prefix, $offset ) {
24
                // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
25
                return base64_encode( "{$prefix}:{$offset}" );
×
26
        }
27

28
        /**
29
         * Given a valid cursor and prefix, the offset is returned
30
         *
31
         * @param string $prefix Salt.
32
         * @param string $cursor Cursor.
33
         *
34
         * @return string|integer
35
         */
36
        public function cursor_to_offset( $prefix, $cursor ) {
37
                // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
38
                return substr( base64_decode( $cursor ), strlen( $prefix . ':' ) );
×
39
        }
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc