Passed
Push — master ( 5cfb80...5d8a7b )
by CodexShaper
13:02
created
admin/class-wpb-admin.php 2 patches
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -22,82 +22,82 @@
 block discarded – undo
22 22
  */
23 23
 class WPB_Admin {
24 24
 
25
-	/**
26
-	 * The ID of this plugin.
27
-	 *
28
-	 * @since    1.0.0
29
-	 * @access   private
30
-	 * @var      string    $plugin_name    The ID of this plugin.
31
-	 */
32
-	private $plugin_name;
33
-
34
-	/**
35
-	 * The version of this plugin.
36
-	 *
37
-	 * @since    1.0.0
38
-	 * @access   private
39
-	 * @var      string    $version    The current version of this plugin.
40
-	 */
41
-	private $version;
42
-
43
-	/**
44
-	 * Initialize the class and set its properties.
45
-	 *
46
-	 * @since    1.0.0
47
-	 * @param      string    $plugin_name       The name of this plugin.
48
-	 * @param      string    $version    The version of this plugin.
49
-	 */
50
-	public function __construct( $plugin_name, $version ) {
51
-
52
-		$this->plugin_name = $plugin_name;
53
-		$this->version = $version;
54
-
55
-	}
56
-
57
-	/**
58
-	 * Register the stylesheets for the admin area.
59
-	 *
60
-	 * @since    1.0.0
61
-	 */
62
-	public function enqueue_styles() {
63
-
64
-		/**
65
-		 * This function is provided for demonstration purposes only.
66
-		 *
67
-		 * An instance of this class should be passed to the run() function
68
-		 * defined in WPB_Loader as all of the hooks are defined
69
-		 * in that particular class.
70
-		 *
71
-		 * The WPB_Loader will then create the relationship
72
-		 * between the defined hooks and the functions defined in this
73
-		 * class.
74
-		 */
75
-
76
-		wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpb-admin.css', array(), $this->version, 'all' );
77
-
78
-	}
79
-
80
-	/**
81
-	 * Register the JavaScript for the admin area.
82
-	 *
83
-	 * @since    1.0.0
84
-	 */
85
-	public function enqueue_scripts() {
86
-
87
-		/**
88
-		 * This function is provided for demonstration purposes only.
89
-		 *
90
-		 * An instance of this class should be passed to the run() function
91
-		 * defined in WPB_Loader as all of the hooks are defined
92
-		 * in that particular class.
93
-		 *
94
-		 * The WPB_Loader will then create the relationship
95
-		 * between the defined hooks and the functions defined in this
96
-		 * class.
97
-		 */
98
-
99
-		wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpb-admin.js', array( 'jquery' ), $this->version, false );
100
-
101
-	}
25
+    /**
26
+     * The ID of this plugin.
27
+     *
28
+     * @since    1.0.0
29
+     * @access   private
30
+     * @var      string    $plugin_name    The ID of this plugin.
31
+     */
32
+    private $plugin_name;
33
+
34
+    /**
35
+     * The version of this plugin.
36
+     *
37
+     * @since    1.0.0
38
+     * @access   private
39
+     * @var      string    $version    The current version of this plugin.
40
+     */
41
+    private $version;
42
+
43
+    /**
44
+     * Initialize the class and set its properties.
45
+     *
46
+     * @since    1.0.0
47
+     * @param      string    $plugin_name       The name of this plugin.
48
+     * @param      string    $version    The version of this plugin.
49
+     */
50
+    public function __construct( $plugin_name, $version ) {
51
+
52
+        $this->plugin_name = $plugin_name;
53
+        $this->version = $version;
54
+
55
+    }
56
+
57
+    /**
58
+     * Register the stylesheets for the admin area.
59
+     *
60
+     * @since    1.0.0
61
+     */
62
+    public function enqueue_styles() {
63
+
64
+        /**
65
+         * This function is provided for demonstration purposes only.
66
+         *
67
+         * An instance of this class should be passed to the run() function
68
+         * defined in WPB_Loader as all of the hooks are defined
69
+         * in that particular class.
70
+         *
71
+         * The WPB_Loader will then create the relationship
72
+         * between the defined hooks and the functions defined in this
73
+         * class.
74
+         */
75
+
76
+        wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpb-admin.css', array(), $this->version, 'all' );
77
+
78
+    }
79
+
80
+    /**
81
+     * Register the JavaScript for the admin area.
82
+     *
83
+     * @since    1.0.0
84
+     */
85
+    public function enqueue_scripts() {
86
+
87
+        /**
88
+         * This function is provided for demonstration purposes only.
89
+         *
90
+         * An instance of this class should be passed to the run() function
91
+         * defined in WPB_Loader as all of the hooks are defined
92
+         * in that particular class.
93
+         *
94
+         * The WPB_Loader will then create the relationship
95
+         * between the defined hooks and the functions defined in this
96
+         * class.
97
+         */
98
+
99
+        wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpb-admin.js', array( 'jquery' ), $this->version, false );
100
+
101
+    }
102 102
 
103 103
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @param      string    $plugin_name       The name of this plugin.
48 48
 	 * @param      string    $version    The version of this plugin.
49 49
 	 */
50
-	public function __construct( $plugin_name, $version ) {
50
+	public function __construct($plugin_name, $version) {
51 51
 
52 52
 		$this->plugin_name = $plugin_name;
53 53
 		$this->version = $version;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		 * class.
74 74
 		 */
75 75
 
76
-		wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpb-admin.css', array(), $this->version, 'all' );
76
+		wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__).'css/wpb-admin.css', array(), $this->version, 'all');
77 77
 
78 78
 	}
79 79
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 		 * class.
97 97
 		 */
98 98
 
99
-		wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpb-admin.js', array( 'jquery' ), $this->version, false );
99
+		wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__).'js/wpb-admin.js', array('jquery'), $this->version, false);
100 100
 
101 101
 	}
102 102
 
Please login to merge, or discard this patch.
admin/class-wpb-admin-submenu.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
  */
23 23
 class WPB_Admin_SubMenu {
24 24
 
25
-	public $parent_slug;
25
+    public $parent_slug;
26 26
 
27 27
     public $page_title;
28 28
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function enqueue_scripts()
98 98
     {
99
-        wp_enqueue_style($this->plugin_name . '-vendors');
100
-        wp_enqueue_style($this->plugin_name . '-admin');
101
-        wp_enqueue_script($this->plugin_name . '-admin');
99
+        wp_enqueue_style($this->plugin_name.'-vendors');
100
+        wp_enqueue_style($this->plugin_name.'-admin');
101
+        wp_enqueue_script($this->plugin_name.'-admin');
102 102
     }
103 103
 
104 104
     /**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function plugin_page()
110 110
     {
111
-        echo '<div class="wrap"><div id="'. $this->plugin_name .'-admin" csrf-token="'.csrf_token().'"></div></div>';
111
+        echo '<div class="wrap"><div id="'.$this->plugin_name.'-admin" csrf-token="'.csrf_token().'"></div></div>';
112 112
     }
113 113
 
114 114
 }
Please login to merge, or discard this patch.
uninstall.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,5 +27,5 @@
 block discarded – undo
27 27
 
28 28
 // If uninstall not called from WordPress, then exit.
29 29
 if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
30
-	exit;
30
+    exit;
31 31
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
  */
27 27
 
28 28
 // If uninstall not called from WordPress, then exit.
29
-if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
29
+if (!defined('WP_UNINSTALL_PLUGIN')) {
30 30
 	exit;
31 31
 }
Please login to merge, or discard this patch.
bootstrap/app.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -7,9 +7,9 @@  discard block
 block discarded – undo
7 7
 
8 8
 // global $app;
9 9
 $app = (new Application([
10
-	'paths' => [
11
-		'root' => WPB_APP_ROOT
12
-	]
10
+    'paths' => [
11
+        'root' => WPB_APP_ROOT
12
+    ]
13 13
 ]));
14 14
 
15 15
 $container = $app->getInstance();
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
 
26 26
 try {
27 27
 
28
-	$kernel = $container->make(\Illuminate\Contracts\Http\Kernel::class);
28
+    $kernel = $container->make(\Illuminate\Contracts\Http\Kernel::class);
29 29
 
30
-	$response = $kernel->handle(\Illuminate\Http\Request::capture());
30
+    $response = $kernel->handle(\Illuminate\Http\Request::capture());
31 31
 
32
-	$response->send();
32
+    $response->send();
33 33
 
34 34
 } catch(\Exception $ex) {
35
-	if(! \WPB\Support\Facades\Route::current()) {
36
-		return true;
37
-	}
38
-	throw new \Exception($ex, 1);
35
+    if(! \WPB\Support\Facades\Route::current()) {
36
+        return true;
37
+    }
38
+    throw new \Exception($ex, 1);
39 39
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 require_once(ABSPATH.'wp-includes/pluggable.php');
3 3
 require_once __DIR__.'/../vendor/autoload.php';
4
-require_once __DIR__. '/../src/helpers.php';
4
+require_once __DIR__.'/../src/helpers.php';
5 5
 
6 6
 use WPB\Application;
7 7
 
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 
32 32
 	$response->send();
33 33
 
34
-} catch(\Exception $ex) {
35
-	if(! \WPB\Support\Facades\Route::current()) {
34
+} catch (\Exception $ex) {
35
+	if (!\WPB\Support\Facades\Route::current()) {
36 36
 		return true;
37 37
 	}
38 38
 	throw new \Exception($ex, 1);
Please login to merge, or discard this patch.
public/class-wpb-public.php 2 patches
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -22,82 +22,82 @@
 block discarded – undo
22 22
  */
23 23
 class WPB_Public {
24 24
 
25
-	/**
26
-	 * The ID of this plugin.
27
-	 *
28
-	 * @since    1.0.0
29
-	 * @access   private
30
-	 * @var      string    $plugin_name    The ID of this plugin.
31
-	 */
32
-	private $plugin_name;
33
-
34
-	/**
35
-	 * The version of this plugin.
36
-	 *
37
-	 * @since    1.0.0
38
-	 * @access   private
39
-	 * @var      string    $version    The current version of this plugin.
40
-	 */
41
-	private $version;
42
-
43
-	/**
44
-	 * Initialize the class and set its properties.
45
-	 *
46
-	 * @since    1.0.0
47
-	 * @param      string    $plugin_name       The name of the plugin.
48
-	 * @param      string    $version    The version of this plugin.
49
-	 */
50
-	public function __construct( $plugin_name, $version ) {
51
-
52
-		$this->plugin_name = $plugin_name;
53
-		$this->version = $version;
54
-
55
-	}
56
-
57
-	/**
58
-	 * Register the stylesheets for the public-facing side of the site.
59
-	 *
60
-	 * @since    1.0.0
61
-	 */
62
-	public function enqueue_styles() {
63
-
64
-		/**
65
-		 * This function is provided for demonstration purposes only.
66
-		 *
67
-		 * An instance of this class should be passed to the run() function
68
-		 * defined in WPB_Loader as all of the hooks are defined
69
-		 * in that particular class.
70
-		 *
71
-		 * The WPB_Loader will then create the relationship
72
-		 * between the defined hooks and the functions defined in this
73
-		 * class.
74
-		 */
75
-
76
-		wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpb-public.css', array(), $this->version, 'all' );
77
-
78
-	}
79
-
80
-	/**
81
-	 * Register the JavaScript for the public-facing side of the site.
82
-	 *
83
-	 * @since    1.0.0
84
-	 */
85
-	public function enqueue_scripts() {
86
-
87
-		/**
88
-		 * This function is provided for demonstration purposes only.
89
-		 *
90
-		 * An instance of this class should be passed to the run() function
91
-		 * defined in WPB_Loader as all of the hooks are defined
92
-		 * in that particular class.
93
-		 *
94
-		 * The WPB_Loader will then create the relationship
95
-		 * between the defined hooks and the functions defined in this
96
-		 * class.
97
-		 */
98
-
99
-		wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpb-public.js', array( 'jquery' ), $this->version, false );
100
-
101
-	}
25
+    /**
26
+     * The ID of this plugin.
27
+     *
28
+     * @since    1.0.0
29
+     * @access   private
30
+     * @var      string    $plugin_name    The ID of this plugin.
31
+     */
32
+    private $plugin_name;
33
+
34
+    /**
35
+     * The version of this plugin.
36
+     *
37
+     * @since    1.0.0
38
+     * @access   private
39
+     * @var      string    $version    The current version of this plugin.
40
+     */
41
+    private $version;
42
+
43
+    /**
44
+     * Initialize the class and set its properties.
45
+     *
46
+     * @since    1.0.0
47
+     * @param      string    $plugin_name       The name of the plugin.
48
+     * @param      string    $version    The version of this plugin.
49
+     */
50
+    public function __construct( $plugin_name, $version ) {
51
+
52
+        $this->plugin_name = $plugin_name;
53
+        $this->version = $version;
54
+
55
+    }
56
+
57
+    /**
58
+     * Register the stylesheets for the public-facing side of the site.
59
+     *
60
+     * @since    1.0.0
61
+     */
62
+    public function enqueue_styles() {
63
+
64
+        /**
65
+         * This function is provided for demonstration purposes only.
66
+         *
67
+         * An instance of this class should be passed to the run() function
68
+         * defined in WPB_Loader as all of the hooks are defined
69
+         * in that particular class.
70
+         *
71
+         * The WPB_Loader will then create the relationship
72
+         * between the defined hooks and the functions defined in this
73
+         * class.
74
+         */
75
+
76
+        wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpb-public.css', array(), $this->version, 'all' );
77
+
78
+    }
79
+
80
+    /**
81
+     * Register the JavaScript for the public-facing side of the site.
82
+     *
83
+     * @since    1.0.0
84
+     */
85
+    public function enqueue_scripts() {
86
+
87
+        /**
88
+         * This function is provided for demonstration purposes only.
89
+         *
90
+         * An instance of this class should be passed to the run() function
91
+         * defined in WPB_Loader as all of the hooks are defined
92
+         * in that particular class.
93
+         *
94
+         * The WPB_Loader will then create the relationship
95
+         * between the defined hooks and the functions defined in this
96
+         * class.
97
+         */
98
+
99
+        wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpb-public.js', array( 'jquery' ), $this->version, false );
100
+
101
+    }
102 102
 
103 103
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	 * @param      string    $plugin_name       The name of the plugin.
48 48
 	 * @param      string    $version    The version of this plugin.
49 49
 	 */
50
-	public function __construct( $plugin_name, $version ) {
50
+	public function __construct($plugin_name, $version) {
51 51
 
52 52
 		$this->plugin_name = $plugin_name;
53 53
 		$this->version = $version;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		 * class.
74 74
 		 */
75 75
 
76
-		wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/wpb-public.css', array(), $this->version, 'all' );
76
+		wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__).'css/wpb-public.css', array(), $this->version, 'all');
77 77
 
78 78
 	}
79 79
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 		 * class.
97 97
 		 */
98 98
 
99
-		wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/wpb-public.js', array( 'jquery' ), $this->version, false );
99
+		wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__).'js/wpb-public.js', array('jquery'), $this->version, false);
100 100
 
101 101
 	}
102 102
 
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,6 +62,6 @@
 block discarded – undo
62 62
             throw new \Exception('View not resolved. Please install View');
63 63
         }
64 64
 
65
-        return (new \CodexShaper\Blade\View([__DIR__ . '/../resources/views'], __DIR__ . '/../storage/cache'))->make($view, $data = [], $mergeData = []);
65
+        return (new \CodexShaper\Blade\View([__DIR__.'/../resources/views'], __DIR__.'/../storage/cache'))->make($view, $data = [], $mergeData = []);
66 66
     }
67 67
 }
Please login to merge, or discard this patch.
src/Application.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
     protected function registerRouter()
152 152
     {
153 153
         $this->app->instance(\Illuminate\Routing\Router::class, $this->app['router']);
154
-         $this->app->instance(\WPB\Router::class, $this->app['router']);  
154
+            $this->app->instance(\WPB\Router::class, $this->app['router']);  
155 155
         $this->app->alias('Route', \WPB\Support\Facades\Route::class);
156 156
     }
157 157
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 
53 53
         $this->app['app'] = $this->app;
54 54
 
55
-        $this->root = __DIR__ . '/../../../../';
55
+        $this->root = __DIR__.'/../../../../';
56 56
 
57
-        if (! empty($this->options) && isset($this->options['paths']['root'])) {
58
-            $this->root = rtrim($this->options['paths']['root'], "/") . '/';
57
+        if (!empty($this->options) && isset($this->options['paths']['root'])) {
58
+            $this->root = rtrim($this->options['paths']['root'], "/").'/';
59 59
         }
60 60
 
61 61
         if (!isset($this->app['root'])) {
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     protected function registerConfig()
91 91
     {
92
-        $this->app->bind('config', function () {
92
+        $this->app->bind('config', function() {
93 93
             return [
94 94
                 'app'           => $this->config->get('app'),
95 95
                 'view.paths'    => $this->config->get('view.paths'),
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
         $this->db->run();
117 117
 
118
-        $this->app->singleton('db', function () {
118
+        $this->app->singleton('db', function() {
119 119
             return $this->db;
120 120
         });
121 121
     }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     {
125 125
         $providers = $this->config->get('app.providers');
126 126
 
127
-        if( $providers && count($providers) > 0) {
127
+        if ($providers && count($providers) > 0) {
128 128
             foreach ($providers as $provider) {
129 129
                 with(new $provider($this->app))->register();
130 130
             }
@@ -133,13 +133,13 @@  discard block
 block discarded – undo
133 133
 
134 134
     protected function registerRequest()
135 135
     {
136
-        $this->app->bind(Request::class, function ($app) {
136
+        $this->app->bind(Request::class, function($app) {
137 137
             $request = Request::capture();
138 138
 
139 139
             if ($wp_user = wp_get_current_user()) {
140 140
                 $user = User::find($wp_user->ID);
141 141
                 $request->merge(['user' => $user]);
142
-                $request->setUserResolver(function () use ($user) {
142
+                $request->setUserResolver(function() use ($user) {
143 143
                     return $user;
144 144
                 });
145 145
             }
@@ -158,12 +158,12 @@  discard block
 block discarded – undo
158 158
     public function loadRoutes($router, $dir = null)
159 159
     {
160 160
         if (!$dir) {
161
-            $dir =  __DIR__ . '/../routes/';
161
+            $dir = __DIR__.'/../routes/';
162 162
         }
163 163
 
164 164
         require $dir.'web.php';
165 165
 
166
-        $router->group(['prefix' => 'api'], function () use ($dir, $router) {
166
+        $router->group(['prefix' => 'api'], function() use ($dir, $router) {
167 167
             require $dir.'api.php';
168 168
         });
169 169
     }
Please login to merge, or discard this patch.
src/Support/Facades/Config.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@
 block discarded – undo
8 8
 
9 9
     public function __construct($options = [])
10 10
     {
11
-        $dir = __DIR__ . '/../../../../../../';
11
+        $dir = __DIR__.'/../../../../../../';
12 12
 
13
-        if (! empty($options) && isset($options['paths']['root'])) {
14
-            $dir = rtrim($options['paths']['root'], "/") . '/';
13
+        if (!empty($options) && isset($options['paths']['root'])) {
14
+            $dir = rtrim($options['paths']['root'], "/").'/';
15 15
         }
16 16
         
17
-        foreach (glob($dir . 'config/*.php') as $file) {
17
+        foreach (glob($dir.'config/*.php') as $file) {
18 18
             $index = pathinfo($file)['filename'];
19 19
             $this->config[$index] = require_once $file;
20 20
         }
Please login to merge, or discard this patch.
src/Composer/ComposerScripts.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         $partials = explode('-', $vendor_name);
47 47
         $camel_case_partials = [];
48 48
         foreach ($partials as $partial) {
49
-           $camel_case_partials[] = ucfirst(strtolower($partial));
49
+            $camel_case_partials[] = ucfirst(strtolower($partial));
50 50
         }
51 51
         $camel_case = implode('_', $camel_case_partials);
52 52
         $snake_case = implode('_', $partials);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         foreach ($files as $file) {
94 94
             $file = $root.$file;
95
-            if(file_exists($file)) {
95
+            if (file_exists($file)) {
96 96
                 $contents = file_get_contents($file);
97 97
                 $contents = str_replace('wpb_', $snake_case.'_', $contents);
98 98
                 $contents = str_replace('wpb', $vendor_name, $contents);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                 $fileName = basename($file);
114 114
                 $newFileName = str_replace('wpb', $vendor_name, $fileName);
115 115
                 
116
-                if($fileName != $newFileName) {
116
+                if ($fileName != $newFileName) {
117 117
                     rename($file, $dir.'/'.$newFileName);
118 118
                 }
119 119
                 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     protected static function configApp($root, $camel_case)
128 128
     {
129 129
         $file = $root.'/bootstrap/app.php';
130
-        if(file_exists($file)) {
130
+        if (file_exists($file)) {
131 131
             $contents = file_get_contents($file);
132 132
             $contents = str_replace('WPB_APP_ROOT', strtoupper($camel_case).'_APP_ROOT', $contents);
133 133
             file_put_contents(
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     protected static function updateComposer($root, $camel_case)
142 142
     {
143 143
         $file = $root.'/composer.json';
144
-        if(file_exists($file)) {
144
+        if (file_exists($file)) {
145 145
             $contents = file_get_contents($file);
146 146
             $contents = str_replace('WPB', $camel_case, $contents);
147 147
             file_put_contents(
Please login to merge, or discard this patch.