Skip to content

Commit faf86c6

Browse files
committed
fix some spacing issues in Registrar and Schema classes
1 parent a20e349 commit faf86c6

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

src/Rest/AbandonedCarts/Schema.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,29 @@
1616
*/
1717
class Schema {
1818

19-
/**
20-
* Get the query params for Abandoned Carts.
21-
*
22-
* @author George Gecewicz <[email protected]>
23-
* @since 2019-11-13
24-
*
19+
/**
20+
* Get the query params for Abandoned Carts.
21+
*
22+
* @author George Gecewicz <[email protected]>
23+
* @since 2019-11-13
24+
*
2525
* @return array
26-
* */
27-
public static function get_collection_params() {
28-
return [
29-
'page' => [],
30-
'per_page' => [],
31-
'date_min' => [],
32-
'date_max' => [],
33-
];
26+
* */
27+
public static function get_collection_params() {
28+
return [
29+
'page' => [],
30+
'per_page' => [],
31+
'date_min' => [],
32+
'date_max' => [],
33+
];
3434
}
3535

3636
/**
3737
* Get the Abandoned Cart's schema for public consumption.
38-
*
38+
*
3939
* @author George Gecewicz <[email protected]>
40-
* @since 2019-11-13
41-
*
40+
* @since 2019-11-13
41+
*
4242
* @return array
4343
*/
4444
public static function get_public_item_schema() {

src/Rest/Registrar.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
*/
2222
class Registrar extends Service {
2323

24-
/**
24+
/**
2525
* Namespace for the endpoints this registrar registers.
2626
*
2727
* @since 2019-10-16
2828
*
2929
* @var string
3030
*/
31-
public static $namespace = 'wc/cc-woo';
31+
public static $namespace = 'wc/cc-woo';
3232

3333
/**
3434
* Register hooks.
@@ -37,9 +37,9 @@ class Registrar extends Service {
3737
* @since 2019-11-13
3838
*/
3939
public function register_hooks() {
40-
add_action( 'rest_api_init', [ $this, 'init_rest_endpoints' ] );
41-
add_filter( 'woocommerce_rest_is_request_to_rest_api', [ $this, 'register_endpoints_with_woo_auth_handler' ] );
42-
}
40+
add_action( 'rest_api_init', [ $this, 'init_rest_endpoints' ] );
41+
add_filter( 'woocommerce_rest_is_request_to_rest_api', [ $this, 'register_endpoints_with_woo_auth_handler' ] );
42+
}
4343

4444
/**
4545
* Initialize REST endpoints.
@@ -49,27 +49,27 @@ public function register_hooks() {
4949
*/
5050
public function init_rest_endpoints() {
5151
( new AbandonedCartsController() )->register_routes();
52-
}
52+
}
5353

54-
/**
54+
/**
5555
* Register REST endpoints with wc/cc-woo namespace with WooCommerce's REST auth handler.
5656
*
5757
* @author George Gecewicz <[email protected]>
5858
* @since 2019-11-13
59-
*
60-
* @return bool
59+
*
60+
* @return bool
6161
*/
62-
public function register_endpoints_with_woo_auth_handler() {
63-
$request_uri = esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) );
62+
public function register_endpoints_with_woo_auth_handler() {
63+
$request_uri = esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) );
6464

65-
if ( empty( $request_uri ) ) {
66-
return false;
67-
}
65+
if ( empty( $request_uri ) ) {
66+
return false;
67+
}
6868

6969
$rest_prefix = trailingslashit( rest_get_url_prefix() );
7070

71-
return false !== strpos( $request_uri, $rest_prefix . self::$namespace );
72-
}
71+
return false !== strpos( $request_uri, $rest_prefix . self::$namespace );
72+
}
7373

7474
}
7575

0 commit comments

Comments
 (0)