Test Failed
Push — master ( 2c1094...3d8979 )
by Mike
44:07
created
src/Server.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@  discard block
 block discarded – undo
7 7
 
8 8
 namespace WooCommerce\RestApi;
9 9
 
10
-defined( 'ABSPATH' ) || exit;
10
+defined('ABSPATH') || exit;
11 11
 
12
-if ( file_exists( __DIR__ . '/../vendor/autoload.php' ) ) {
12
+if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
13 13
 	require __DIR__ . '/../vendor/autoload.php';
14 14
 } else {
15
-	wp_die( 'WooCommerce Rest API build required' );
15
+	wp_die('WooCommerce Rest API build required');
16 16
 }
17 17
 
18 18
 use WooCommerce\RestApi\Utilities\SingletonTrait;
@@ -34,17 +34,17 @@  discard block
 block discarded – undo
34 34
 	 * Hook into WordPress ready to init the REST API as needed.
35 35
 	 */
36 36
 	public function init() {
37
-		add_action( 'rest_api_init', array( $this, 'register_rest_routes' ), 10 );
37
+		add_action('rest_api_init', array($this, 'register_rest_routes'), 10);
38 38
 	}
39 39
 
40 40
 	/**
41 41
 	 * Register REST API routes.
42 42
 	 */
43 43
 	public function register_rest_routes() {
44
-		foreach ( $this->get_rest_namespaces() as $namespace => $controllers ) {
45
-			foreach ( $controllers as $controller_name => $controller_class ) {
46
-				$this->controllers[ $namespace ][ $controller_name ] = new $controller_class();
47
-				$this->controllers[ $namespace ][ $controller_name ]->register_routes();
44
+		foreach ($this->get_rest_namespaces() as $namespace => $controllers) {
45
+			foreach ($controllers as $controller_name => $controller_class) {
46
+				$this->controllers[$namespace][$controller_name] = new $controller_class();
47
+				$this->controllers[$namespace][$controller_name]->register_routes();
48 48
 			}
49 49
 		}
50 50
 	}
Please login to merge, or discard this patch.