Passed
Push — master ( 6dea97...789b6e )
by Arthur
07:14 queued 01:06
created
src/Foundation/Traits/RefreshDatabase.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         $this->artisan('migrate:fresh');
23 23
         $this->artisan('db:seed');
24 24
 
25
-        $this->beforeApplicationDestroyed(function () {
25
+        $this->beforeApplicationDestroyed(function() {
26 26
             $this->artisan('cache:model:clear');
27 27
             $this->artisan('migrate:rollback');
28 28
             RefreshDatabaseState::$migrated = false;
Please login to merge, or discard this patch.
src/Foundation/Traits/Cacheable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,16 +15,16 @@  discard block
 block discarded – undo
15 15
 
16 16
 trait Cacheable
17 17
 {
18
-    public static function find($id, $columns = ['*'])
18
+    public static function find($id, $columns = [ '*' ])
19 19
     {
20
-        if ((bool)config('model.caching')) {
20
+        if ((bool) config('model.caching')) {
21 21
             $model = ModelCache::findOrRequery($id, get_called_class());
22 22
             return self::filterFromColumns($model, $columns);
23 23
         }
24 24
         return static::findWithoutCache($id, $columns);
25 25
     }
26 26
 
27
-    public static function findWithoutCache($id, $columns = ['*'])
27
+    public static function findWithoutCache($id, $columns = [ '*' ])
28 28
     {
29 29
         $model = new static();
30 30
         if (is_array($id) || $id instanceof Arrayable) {
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
     private static function filterFromColumns($model, $columns)
37 37
     {
38
-        if ($columns !== ['*']) {
38
+        if ($columns !== [ '*' ]) {
39 39
             return collect($model)->first($columns);
40 40
         }
41 41
         return $model;
Please login to merge, or discard this patch.
src/Foundation/Models/MongoDatabaseNotification.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      *
26 26
      * @var array
27 27
      */
28
-    protected $guarded = [];
28
+    protected $guarded = [ ];
29 29
     /**
30 30
      * The attributes that should be cast to native types.
31 31
      *
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     public function markAsRead()
53 53
     {
54 54
         if (is_null($this->read_at)) {
55
-            $this->forceFill(['read_at' => $this->freshTimestamp()])->save();
55
+            $this->forceFill([ 'read_at' => $this->freshTimestamp() ])->save();
56 56
         }
57 57
     }
58 58
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      * @param  array $models
83 83
      * @return \Illuminate\Notifications\DatabaseNotificationCollection
84 84
      */
85
-    public function newCollection(array $models = [])
85
+    public function newCollection(array $models = [ ])
86 86
     {
87 87
         return new DatabaseNotificationCollection($models);
88 88
     }
Please login to merge, or discard this patch.
src/Foundation/Providers/BootstrapServiceProvider.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $this->overrideSeedCommand();
31 31
 
32
-        if ((bool)config('model.caching')) {
32
+        if ((bool) config('model.caching')) {
33 33
             $this->loadCacheObservers();
34 34
         }
35 35
 
@@ -74,16 +74,16 @@  discard block
 block discarded – undo
74 74
     private function loadRoutes()
75 75
     {
76 76
         foreach ($this->bootstrapService->getRoutes() as $route) {
77
-            $path = $route['path'];
77
+            $path = $route[ 'path' ];
78 78
             Route::group([
79
-                'prefix' => 'v1/' . $route['module'],
80
-                'namespace' => $route['controller'],
81
-                'domain' => $route['domain'],
82
-                'middleware' => ['api'],
83
-            ], function () use ($path) {
79
+                'prefix' => 'v1/'.$route[ 'module' ],
80
+                'namespace' => $route[ 'controller' ],
81
+                'domain' => $route[ 'domain' ],
82
+                'middleware' => [ 'api' ],
83
+            ], function() use ($path) {
84 84
                 require $path;
85 85
             });
86
-            Route::model($route['module'], $route['model']);
86
+            Route::model($route[ 'module' ], $route[ 'model' ]);
87 87
         }
88 88
     }
89 89
 
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
     protected function loadConfigs()
96 96
     {
97 97
         foreach ($this->bootstrapService->getConfigs() as $config) {
98
-            if ($config['filename'] === 'config.php') {
98
+            if ($config[ 'filename' ] === 'config.php') {
99 99
                 $this->publishes([
100
-                    $config['path'] => config_path($config['module']),
100
+                    $config[ 'path' ] => config_path($config[ 'module' ]),
101 101
                 ], 'config');
102 102
                 $this->mergeConfigFrom(
103
-                    $config['path'], basename($config['module'], '.php')
103
+                    $config[ 'path' ], basename($config[ 'module' ], '.php')
104 104
                 );
105 105
             }
106 106
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     {
116 116
         foreach ($this->bootstrapService->getFactories() as $factory) {
117 117
             if (!$this->app->environment('production')) {
118
-                app(Factory::class)->load($factory['path']);
118
+                app(Factory::class)->load($factory[ 'path' ]);
119 119
             }
120 120
         }
121 121
     }
@@ -128,15 +128,15 @@  discard block
 block discarded – undo
128 128
     public function loadMigrations()
129 129
     {
130 130
         foreach ($this->bootstrapService->getMigrations() as $migration) {
131
-            $this->loadMigrationsFrom($migration['path']);
131
+            $this->loadMigrationsFrom($migration[ 'path' ]);
132 132
         }
133 133
     }
134 134
 
135 135
     private function loadPolicies()
136 136
     {
137 137
         foreach ($this->bootstrapService->getPolicies() as $policy) {
138
-            if (class_implements_interface($policy['class'], ModelPolicyContract::class)) {
139
-                Gate::policy($policy['model'], $policy['class']);
138
+            if (class_implements_interface($policy[ 'class' ], ModelPolicyContract::class)) {
139
+                Gate::policy($policy[ 'model' ], $policy[ 'class' ]);
140 140
             }
141 141
         }
142 142
     }
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
     {
146 146
         $app = $this->app;
147 147
         $service = $this->bootstrapService;
148
-        $this->app->extend('command.seed', function () use ($app, $service) {
149
-            return new SeedCommand($app['db'], $service);
148
+        $this->app->extend('command.seed', function() use ($app, $service) {
149
+            return new SeedCommand($app[ 'db' ], $service);
150 150
         });
151 151
     }
152 152
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         foreach ($this->bootstrapService->getModels() as $model) {
165 165
             if (class_implements_interface($model, Ownable::class)) {
166 166
                 Gate::policy($model, OwnershipPolicy::class);
167
-                Gate::define('access', OwnershipPolicy::class . '@access');
167
+                Gate::define('access', OwnershipPolicy::class.'@access');
168 168
             }
169 169
         }
170 170
     }
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
     private function loadListeners()
180 180
     {
181 181
         foreach ($this->bootstrapService->getEvents() as $event) {
182
-            foreach ($event['listeners'] as $listener) {
183
-                Event::listen($event['class'], $listener);
182
+            foreach ($event[ 'listeners' ] as $listener) {
183
+                Event::listen($event[ 'class' ], $listener);
184 184
             }
185 185
         }
186 186
     }
Please login to merge, or discard this patch.
src/Modules/Auth0/Http/Middleware/Auth0AuthenticationMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,14 +39,14 @@
 block discarded – undo
39 39
 
40 40
 
41 41
             if (!$user) {
42
-                return response()->json(['error' => 'Unauthorized user.'], 401);
42
+                return response()->json([ 'error' => 'Unauthorized user.' ], 401);
43 43
             }
44 44
 
45 45
             \Auth::login($user);
46 46
         } catch (InvalidTokenException $e) {
47
-            return response()->json(['error' => 'Invalid or no token set.'], 401);
47
+            return response()->json([ 'error' => 'Invalid or no token set.' ], 401);
48 48
         } catch (CoreException $e) {
49
-            return response()->json(['error' => $e->getMessage()], 401);
49
+            return response()->json([ 'error' => $e->getMessage() ], 401);
50 50
         }
51 51
 
52 52
         return $next($request);
Please login to merge, or discard this patch.
src/Modules/Auth0/Services/Auth0Service.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function getUserByUserInfo($userInfo)
44 44
     {
45
-        return $this->upsertUser($userInfo['profile']);
45
+        return $this->upsertUser($userInfo[ 'profile' ]);
46 46
     }
47 47
 
48 48
     protected function upsertUser($profile)
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
             throw new BadRequestHttpException('Missing token information: Auth0 user id is not set');
52 52
         }
53 53
         $identifier = explode('|', $profile->user_id);
54
-        $identityProvider = $identifier[0];
55
-        $id = $identifier[1];
54
+        $identityProvider = $identifier[ 0 ];
55
+        $id = $identifier[ 1 ];
56 56
 
57 57
         $user = $this->service->find($id);
58 58
         if ($user === null) {
Please login to merge, or discard this patch.