Completed
Push — master ( 370ac4...071b30 )
by CodexShaper
15:05
created
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.
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.
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.
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 1 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/Exceptions/Handler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     {
150 150
         $dontReport = array_merge($this->dontReport, $this->internalDontReport);
151 151
 
152
-        return !is_null(Arr::first($dontReport, function ($type) use ($e) {
152
+        return !is_null(Arr::first($dontReport, function($type) use ($e) {
153 153
             return $e instanceof $type;
154 154
         }));
155 155
     }
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
      */
371 371
     protected function renderExceptionWithWhoops(Throwable $e)
372 372
     {
373
-        return tap(new Whoops(), function ($whoops) {
373
+        return tap(new Whoops(), function($whoops) {
374 374
             $whoops->appendHandler($this->whoopsHandler());
375 375
 
376 376
             $whoops->writeToOutput(false);
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
     {
439 439
         $paths = collect($this->container['config']['view.paths']);
440 440
 
441
-        View::replaceNamespace('errors', $paths->map(function ($path) {
441
+        View::replaceNamespace('errors', $paths->map(function($path) {
442 442
             return "{$path}/errors";
443 443
         })->push(__DIR__.'/views')->all());
444 444
     }
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
             'exception' => get_class($e),
515 515
             'file'      => $e->getFile(),
516 516
             'line'      => $e->getLine(),
517
-            'trace'     => collect($e->getTrace())->map(function ($trace) {
517
+            'trace'     => collect($e->getTrace())->map(function($trace) {
518 518
                 return Arr::except($trace, ['args']);
519 519
             })->all(),
520 520
         ] : [
Please login to merge, or discard this patch.
src/Http/Kernel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
      */
149 149
     protected function dispatchToRouter()
150 150
     {
151
-        return function ($request) {
151
+        return function($request) {
152 152
             $this->app->instance('request', $request);
153 153
 
154 154
             return $this->router->dispatch($request);
Please login to merge, or discard this patch.
app/Post.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         // static::addGlobalScope(new PostTypeScope);
46 46
         // static::addGlobalScope(new PostStatusScope);
47 47
         // static::addGlobalScope(new PostAuthorScope);
48
-        static::addGlobalScope('type', function (Builder $builder) {
48
+        static::addGlobalScope('type', function(Builder $builder) {
49 49
             $builder->where('post_type', '=', static::$type_scope);
50 50
         });
51 51
         // static::addGlobalScope('scope', function (Builder $builder) {
Please login to merge, or discard this patch.