Passed
Push — master ( 5cfb80...5d8a7b )
by CodexShaper
13:02
created
config/view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
 	'paths' => [
5
-		__DIR__ . '/../resources/views'
5
+		__DIR__.'/../resources/views'
6 6
 	],
7
-	'compiled' => __DIR__ . '/../storage/cache',
7
+	'compiled' => __DIR__.'/../storage/cache',
8 8
 ];
9 9
\ No newline at end of file
Please login to merge, or discard this patch.
config/database.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
 	'paths' => [
5
-		'migrations' => __DIR__ . '/../database/migrations',
6
-		'seeds' => __DIR__ . '/../database/seeds',
5
+		'migrations' => __DIR__.'/../database/migrations',
6
+		'seeds' => __DIR__.'/../database/seeds',
7 7
 	],
8 8
 ];
9 9
\ No newline at end of file
Please login to merge, or discard this patch.
includes/class-wpb-i18n.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 		load_plugin_textdomain(
38 38
 			'wpb',
39 39
 			false,
40
-			dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/'
40
+			dirname(dirname(plugin_basename(__FILE__))).'/languages/'
41 41
 		);
42 42
 
43 43
 	}
Please login to merge, or discard this patch.
includes/class-wpb-loader.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
 	 * @param    int                  $priority         Optional. The priority at which the function should be fired. Default is 10.
64 64
 	 * @param    int                  $accepted_args    Optional. The number of arguments that should be passed to the $callback. Default is 1.
65 65
 	 */
66
-	public function add_action( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
67
-		$this->actions = $this->add( $this->actions, $hook, $component, $callback, $priority, $accepted_args );
66
+	public function add_action($hook, $component, $callback, $priority = 10, $accepted_args = 1) {
67
+		$this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args);
68 68
 	}
69 69
 
70 70
 	/**
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 	 * @param    int                  $priority         Optional. The priority at which the function should be fired. Default is 10.
78 78
 	 * @param    int                  $accepted_args    Optional. The number of arguments that should be passed to the $callback. Default is 1
79 79
 	 */
80
-	public function add_filter( $hook, $component, $callback, $priority = 10, $accepted_args = 1 ) {
81
-		$this->filters = $this->add( $this->filters, $hook, $component, $callback, $priority, $accepted_args );
80
+	public function add_filter($hook, $component, $callback, $priority = 10, $accepted_args = 1) {
81
+		$this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args);
82 82
 	}
83 83
 
84 84
 	/**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 * @param    int                  $accepted_args    The number of arguments that should be passed to the $callback.
96 96
 	 * @return   array                                  The collection of actions and filters registered with WordPress.
97 97
 	 */
98
-	private function add( $hooks, $hook, $component, $callback, $priority, $accepted_args ) {
98
+	private function add($hooks, $hook, $component, $callback, $priority, $accepted_args) {
99 99
 
100 100
 		$hooks[] = array(
101 101
 			'hook'          => $hook,
@@ -116,12 +116,12 @@  discard block
 block discarded – undo
116 116
 	 */
117 117
 	public function run() {
118 118
 
119
-		foreach ( $this->filters as $hook ) {
120
-			add_filter( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
119
+		foreach ($this->filters as $hook) {
120
+			add_filter($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']);
121 121
 		}
122 122
 
123
-		foreach ( $this->actions as $hook ) {
124
-			add_action( $hook['hook'], array( $hook['component'], $hook['callback'] ), $hook['priority'], $hook['accepted_args'] );
123
+		foreach ($this->actions as $hook) {
124
+			add_action($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'], $hook['accepted_args']);
125 125
 		}
126 126
 
127 127
 	}
Please login to merge, or discard this patch.
includes/class-wpb.php 1 patch
Spacing   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
 		$this->define_constants();
76 76
 
77
-		if ( defined( 'WPB_VERSION' ) ) {
77
+		if (defined('WPB_VERSION')) {
78 78
 			$this->version = WPB_VERSION;
79 79
 		} else {
80 80
 			$this->version = '1.0.0';
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         $submenu->page_title = 'Settings';
105 105
         $submenu->menu_title = 'Settings';
106 106
         $submenu->capability = 'manage_options';
107
-        $submenu->slug = 'admin.php?page=' . $menu->slug . '#/settings';
107
+        $submenu->slug = 'admin.php?page='.$menu->slug.'#/settings';
108 108
         $submenu->save();
109 109
 	}
110 110
 
@@ -130,34 +130,34 @@  discard block
 block discarded – undo
130 130
 		 * The class responsible for orchestrating the actions and filters of the
131 131
 		 * core plugin.
132 132
 		 */
133
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wpb-loader.php';
133
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wpb-loader.php';
134 134
 
135 135
 		/**
136 136
 		 * The class responsible for defining internationalization functionality
137 137
 		 * of the plugin.
138 138
 		 */
139
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wpb-i18n.php';
139
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wpb-i18n.php';
140 140
 
141 141
 		/**
142 142
 		 * The class responsible for defining all actions that occur in the admin area.
143 143
 		 */
144
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wpb-admin.php';
144
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wpb-admin.php';
145 145
 
146 146
 		/**
147 147
 		 * The class responsible for defining all menu actions that occur in the admin area.
148 148
 		 */
149
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wpb-admin-menu.php';
149
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wpb-admin-menu.php';
150 150
 
151 151
 		/**
152 152
 		 * The class responsible for defining all submenu actions that occur in the admin area.
153 153
 		 */
154
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wpb-admin-submenu.php';
154
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wpb-admin-submenu.php';
155 155
 
156 156
 		/**
157 157
 		 * The class responsible for defining all actions that occur in the public-facing
158 158
 		 * side of the site.
159 159
 		 */
160
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wpb-public.php';
160
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wpb-public.php';
161 161
 
162 162
 		$this->loader = new WPB_Loader();
163 163
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
 		$plugin_i18n = new WPB_i18n();
178 178
 
179
-		$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
179
+		$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
180 180
 
181 181
 	}
182 182
 
@@ -189,10 +189,10 @@  discard block
 block discarded – undo
189 189
 	 */
190 190
 	private function define_admin_hooks() {
191 191
 
192
-		$plugin_admin = new WPB_Admin( $this->get_plugin_name(), $this->get_version() );
192
+		$plugin_admin = new WPB_Admin($this->get_plugin_name(), $this->get_version());
193 193
 
194
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
195
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
194
+		$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
195
+		$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts');
196 196
 
197 197
 	}
198 198
 
@@ -205,10 +205,10 @@  discard block
 block discarded – undo
205 205
 	 */
206 206
 	private function define_public_hooks() {
207 207
 
208
-		$plugin_public = new WPB_Public( $this->get_plugin_name(), $this->get_version() );
208
+		$plugin_public = new WPB_Public($this->get_plugin_name(), $this->get_version());
209 209
 
210
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
211
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
210
+		$this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles');
211
+		$this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
212 212
 
213 213
 	}
214 214
 
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      * @return void
259 259
      */
260 260
     public function define_constants() {
261
-        define( 'WPB_VERSION', $this->version );
261
+        define('WPB_VERSION', $this->version);
262 262
     }
263 263
 
264 264
     /**
@@ -267,8 +267,8 @@  discard block
 block discarded – undo
267 267
      * @return void
268 268
      */
269 269
     public function register_assets() {
270
-        $this->register_scripts( $this->get_scripts() );
271
-        $this->register_styles( $this->get_styles() );
270
+        $this->register_scripts($this->get_scripts());
271
+        $this->register_styles($this->get_styles());
272 272
     }
273 273
 
274 274
     /**
@@ -278,13 +278,13 @@  discard block
 block discarded – undo
278 278
      *
279 279
      * @return void
280 280
      */
281
-    private function register_scripts( $scripts ) {
282
-        foreach ( $scripts as $handle => $script ) {
283
-            $deps      = isset( $script['deps'] ) ? $script['deps'] : false;
284
-            $in_footer = isset( $script['in_footer'] ) ? $script['in_footer'] : false;
285
-            $version   = isset( $script['version'] ) ? $script['version'] : WPB_VERSION;
281
+    private function register_scripts($scripts) {
282
+        foreach ($scripts as $handle => $script) {
283
+            $deps      = isset($script['deps']) ? $script['deps'] : false;
284
+            $in_footer = isset($script['in_footer']) ? $script['in_footer'] : false;
285
+            $version   = isset($script['version']) ? $script['version'] : WPB_VERSION;
286 286
 
287
-            wp_register_script( $handle, $script['src'], $deps, $version, $in_footer );
287
+            wp_register_script($handle, $script['src'], $deps, $version, $in_footer);
288 288
         }
289 289
     }
290 290
 
@@ -295,11 +295,11 @@  discard block
 block discarded – undo
295 295
      *
296 296
      * @return void
297 297
      */
298
-    public function register_styles( $styles ) {
299
-        foreach ( $styles as $handle => $style ) {
300
-            $deps = isset( $style['deps'] ) ? $style['deps'] : false;
298
+    public function register_styles($styles) {
299
+        foreach ($styles as $handle => $style) {
300
+            $deps = isset($style['deps']) ? $style['deps'] : false;
301 301
 
302
-            wp_register_style( $handle, $style['src'], $deps, WPB_VERSION );
302
+            wp_register_style($handle, $style['src'], $deps, WPB_VERSION);
303 303
         }
304 304
     }
305 305
 
@@ -310,35 +310,35 @@  discard block
 block discarded – undo
310 310
      */
311 311
     public function get_scripts() {
312 312
 
313
-        $prefix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.min' : '';
313
+        $prefix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.min' : '';
314 314
 
315 315
         $scripts = [
316 316
             'wpb-runtime' => [
317
-                'src'       => WPB_ASSETS . '/js/runtime.js',
318
-                'version'   => filemtime( WPB_PATH . '/public/js/runtime.js' ),
317
+                'src'       => WPB_ASSETS.'/js/runtime.js',
318
+                'version'   => filemtime(WPB_PATH.'/public/js/runtime.js'),
319 319
                 'in_footer' => true
320 320
             ],
321 321
             'wpb-vendor' => [
322
-                'src'       => WPB_ASSETS . '/js/vendors.js',
323
-                'version'   => filemtime( WPB_PATH . '/public/js/vendors.js' ),
322
+                'src'       => WPB_ASSETS.'/js/vendors.js',
323
+                'version'   => filemtime(WPB_PATH.'/public/js/vendors.js'),
324 324
                 'in_footer' => true
325 325
             ],
326 326
             'wpb-frontend' => [
327
-                'src'       => WPB_ASSETS . '/js/frontend.js',
328
-                'deps'      => [ 'jquery', 'wpb-vendor', 'wpb-runtime' ],
329
-                'version'   => filemtime( WPB_PATH . '/public/js/frontend.js' ),
327
+                'src'       => WPB_ASSETS.'/js/frontend.js',
328
+                'deps'      => ['jquery', 'wpb-vendor', 'wpb-runtime'],
329
+                'version'   => filemtime(WPB_PATH.'/public/js/frontend.js'),
330 330
                 'in_footer' => true
331 331
             ],
332 332
             'wpb-admin' => [
333
-                'src'       => WPB_ASSETS . '/js/admin.js',
334
-                'deps'      => [ 'jquery', 'wpb-vendor', 'wpb-runtime' ],
335
-                'version'   => filemtime( WPB_PATH . '/public/js/admin.js' ),
333
+                'src'       => WPB_ASSETS.'/js/admin.js',
334
+                'deps'      => ['jquery', 'wpb-vendor', 'wpb-runtime'],
335
+                'version'   => filemtime(WPB_PATH.'/public/js/admin.js'),
336 336
                 'in_footer' => true
337 337
             ],
338 338
             'wpb-spa' => [
339
-                'src'       => WPB_ASSETS . '/js/spa.js',
340
-                'deps'      => [ 'jquery', 'wpb-vendor', 'wpb-runtime' ],
341
-                'version'   => filemtime( WPB_PATH . '/public/js/spa.js' ),
339
+                'src'       => WPB_ASSETS.'/js/spa.js',
340
+                'deps'      => ['jquery', 'wpb-vendor', 'wpb-runtime'],
341
+                'version'   => filemtime(WPB_PATH.'/public/js/spa.js'),
342 342
                 'in_footer' => true
343 343
             ]
344 344
         ];
@@ -355,19 +355,19 @@  discard block
 block discarded – undo
355 355
 
356 356
         $styles = [
357 357
             'wpb-style' => [
358
-                'src' =>  WPB_ASSETS . '/css/style.css'
358
+                'src' =>  WPB_ASSETS.'/css/style.css'
359 359
             ],
360 360
             'wpb-frontend' => [
361
-                'src' =>  WPB_ASSETS . '/css/frontend.css'
361
+                'src' =>  WPB_ASSETS.'/css/frontend.css'
362 362
             ],
363 363
             'wpb-admin' => [
364
-                'src' =>  WPB_ASSETS . '/css/admin.css'
364
+                'src' =>  WPB_ASSETS.'/css/admin.css'
365 365
             ],
366 366
             'wpb-spa' => [
367
-                'src' =>  WPB_ASSETS . '/css/spa.css'
367
+                'src' =>  WPB_ASSETS.'/css/spa.css'
368 368
             ],
369 369
             'wpb-vendors' => [
370
-                'src' =>  WPB_ASSETS . '/css/vendors.css'
370
+                'src' =>  WPB_ASSETS.'/css/vendors.css'
371 371
             ],
372 372
         ];
373 373
 
Please login to merge, or discard this patch.
wpb.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,33 +26,33 @@  discard block
 block discarded – undo
26 26
  */
27 27
 
28 28
 // If this file is called directly, abort.
29
-if ( ! defined( 'WPINC' ) ) {
29
+if (!defined('WPINC')) {
30 30
 	die;
31 31
 }
32 32
 
33 33
 // Application root directory.
34 34
 if (!defined('WPB_APP_ROOT')) {
35
-	define( 'WPB_APP_ROOT', __DIR__ );
35
+	define('WPB_APP_ROOT', __DIR__);
36 36
 }
37 37
 // Worpress plugin builder file path.
38 38
 if (!defined('WPB_FILE')) {
39
-	define( 'WPB_FILE', __FILE__ );
39
+	define('WPB_FILE', __FILE__);
40 40
 }
41 41
 // Worpress plugin builder directory path.
42 42
 if (!defined('WPB_PATH')) {
43
-	define( 'WPB_PATH', dirname( WPB_FILE ) );
43
+	define('WPB_PATH', dirname(WPB_FILE));
44 44
 }
45 45
 // Worpress plugin builder includes path.
46 46
 if (!defined('WPB_INCLUDES')) {
47
-	define( 'WPB_INCLUDES', WPB_PATH . '/includes' );
47
+	define('WPB_INCLUDES', WPB_PATH.'/includes');
48 48
 }
49 49
 // Worpress plugin builder url.
50 50
 if (!defined('WPB_URL')) {
51
-	define( 'WPB_URL', plugins_url( '', WPB_FILE ) );
51
+	define('WPB_URL', plugins_url('', WPB_FILE));
52 52
 }
53 53
 // Worpress plugin builder assets path.
54 54
 if (!defined('WPB_ASSETS')) {
55
-	define( 'WPB_ASSETS', WPB_URL . '/public' );
55
+	define('WPB_ASSETS', WPB_URL.'/public');
56 56
 }
57 57
 
58 58
 require_once __DIR__.'/bootstrap/app.php';
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
  * Start at version 1.0.0 and use SemVer - https://semver.org
63 63
  * Rename this for your plugin and update it as you release new versions.
64 64
  */
65
-define( 'WPB_VERSION', '1.0.0' );
65
+define('WPB_VERSION', '1.0.0');
66 66
 
67 67
 /**
68 68
  * The code that runs during plugin activation.
69 69
  * This action is documented in includes/class-wpb-activator.php
70 70
  */
71 71
 function wpb_activate() {
72
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wpb-activator.php';
72
+	require_once plugin_dir_path(__FILE__).'includes/class-wpb-activator.php';
73 73
 	WPB_Activator::activate();
74 74
 }
75 75
 
@@ -78,18 +78,18 @@  discard block
 block discarded – undo
78 78
  * This action is documented in includes/class-wpb-deactivator.php
79 79
  */
80 80
 function wpb_deactivate() {
81
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wpb-deactivator.php';
81
+	require_once plugin_dir_path(__FILE__).'includes/class-wpb-deactivator.php';
82 82
 	WPB_Deactivator::deactivate();
83 83
 }
84 84
 
85
-register_activation_hook( __FILE__, 'wpb_activate' );
86
-register_deactivation_hook( __FILE__, 'wpb_deactivate' );
85
+register_activation_hook(__FILE__, 'wpb_activate');
86
+register_deactivation_hook(__FILE__, 'wpb_deactivate');
87 87
 
88 88
 /**
89 89
  * The core plugin class that is used to define internationalization,
90 90
  * admin-specific hooks, and public-facing site hooks.
91 91
  */
92
-require plugin_dir_path( __FILE__ ) . 'includes/class-wpb.php';
92
+require plugin_dir_path(__FILE__).'includes/class-wpb.php';
93 93
 
94 94
 /**
95 95
  * Begins execution of the plugin.
Please login to merge, or discard this patch.
admin/class-wpb-admin-menu.php 1 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.
admin/class-wpb-admin.php 1 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.
uninstall.php 1 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.