Passed
Push — master ( 35703b...c61362 )
by Arthur
13:38 queued 08:34
created
src/Modules/User/Entities/User.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,16 +40,16 @@
 block discarded – undo
40 40
      */
41 41
     protected $table = 'users';
42 42
 
43
-    protected $with = ['roles', 'permissions'];
43
+    protected $with = [ 'roles', 'permissions' ];
44 44
 
45 45
     public $cacheTime = 60;
46 46
 
47
-    public $secondaryCacheIndexes = ['identity_id'];
47
+    public $secondaryCacheIndexes = [ 'identity_id' ];
48 48
 
49 49
     /**
50 50
      * @var array
51 51
      */
52
-    protected $guarded = [];
52
+    protected $guarded = [ ];
53 53
 
54 54
     protected $casts = [
55 55
         'email_verified' => 'bool',
Please login to merge, or discard this patch.
src/Modules/User/Services/UserService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
     public function setRoles($id, array $roles): void
72 72
     {
73 73
         if (!in_array(Role::USER, $roles)) {
74
-            $roles[] = Role::USER;
74
+            $roles[ ] = Role::USER;
75 75
         }
76 76
         $this->find($id)->syncRoles($roles);
77 77
     }
Please login to merge, or discard this patch.
src/Modules/Machine/Events/MachineUpdatedEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 class MachineUpdatedEvent extends Event implements ShouldBroadcast
18 18
 {
19
-    public $listeners = [];
19
+    public $listeners = [ ];
20 20
 
21 21
     /**
22 22
      * @var Machine
Please login to merge, or discard this patch.
src/Modules/Machine/Services/MachineService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@
 block discarded – undo
56 56
     {
57 57
         $this->update($id, [
58 58
             'last_heartbeat' => Carbon::now(),
59
-            'memory_usage'   => $data['memory_usage'],
60
-            'cpu_usage'      => $data['cpu_usage'],
59
+            'memory_usage'   => $data[ 'memory_usage' ],
60
+            'cpu_usage'      => $data[ 'cpu_usage' ],
61 61
             'online'         => true,
62 62
         ]);
63 63
     }
Please login to merge, or discard this patch.
src/Foundation/Providers/TelescopeServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
         $this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class);
21 21
         //Telescope::night();
22 22
 
23
-        Telescope::filter(function (IncomingEntry $entry) {
23
+        Telescope::filter(function(IncomingEntry $entry) {
24 24
             if ($entry->type === EntryType::REQUEST
25
-                && isset($entry->content['uri'])
26
-                && str_contains($entry->content['uri'], 'horizon')) {
25
+                && isset($entry->content[ 'uri' ])
26
+                && str_contains($entry->content[ 'uri' ], 'horizon')) {
27 27
                 return false;
28 28
             }
29 29
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     protected function gate()
49 49
     {
50
-        Gate::define('viewTelescope', function ($user) {
50
+        Gate::define('viewTelescope', function($user) {
51 51
             return in_array($user->email, [
52 52
                 //
53 53
             ]);
Please login to merge, or discard this patch.
src/Foundation/Cache/ModelCacheOOP.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     /**
25 25
      * ModelCacheOOP constructor.
26 26
      */
27
-    public function __construct(string $model, array $indexes = [], $cacheTime = null)
27
+    public function __construct(string $model, array $indexes = [ ], $cacheTime = null)
28 28
     {
29 29
         $this->model = $model;
30 30
         $this->secondaryIndexes = $indexes;
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     protected function eagerLoadRelations($model)
66 66
     {
67 67
         if ($model !== null) {
68
-            return $model::eagerLoadRelations([$model])[0];
68
+            return $model::eagerLoadRelations([ $model ])[ 0 ];
69 69
         }
70 70
     }
71 71
 
Please login to merge, or discard this patch.
src/Foundation/Abstracts/Tests/HttpTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,32 +58,32 @@
 block discarded – undo
58 58
         }
59 59
 
60 60
         if ($unwrap) {
61
-            return json_decode($content, true)['data'] ?? json_decode($content, true);
61
+            return json_decode($content, true)[ 'data' ] ?? json_decode($content, true);
62 62
         }
63 63
 
64 64
         return json_decode($content, true);
65 65
     }
66 66
 
67
-    protected function http(string $method, string $route, array $payload = [])
67
+    protected function http(string $method, string $route, array $payload = [ ])
68 68
     {
69 69
         return $this->sendRequest($method, $route, $payload, true);
70 70
     }
71 71
 
72
-    private function sendRequest(string $method, string $route, array $payload = [], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse
72
+    private function sendRequest(string $method, string $route, array $payload = [ ], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse
73 73
     {
74 74
         return $this->json($method, env('API_URL').'/'.$route, $payload, $authenticated ? [
75 75
             'Authorization' => 'Bearer '.$this->getAuth0Service()->getTestUserToken()->id_token,
76
-        ] : []);
76
+        ] : [ ]);
77 77
     }
78 78
 
79
-    protected function sendRequestWithToken($token, string $method, string $route, array $payload = [], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse
79
+    protected function sendRequestWithToken($token, string $method, string $route, array $payload = [ ], $authenticated = true): \Illuminate\Foundation\Testing\TestResponse
80 80
     {
81 81
         return $this->json($method, env('API_URL').'/'.$route, $payload, $authenticated ? [
82 82
             'Authorization' => 'Bearer '.$token,
83
-        ] : []);
83
+        ] : [ ]);
84 84
     }
85 85
 
86
-    protected function httpNoAuth(string $method, string $route, array $payload = [])
86
+    protected function httpNoAuth(string $method, string $route, array $payload = [ ])
87 87
     {
88 88
         return $this->sendRequest($method, $route, $payload, false);
89 89
     }
Please login to merge, or discard this patch.
src/Foundation/Abstracts/Transformers/Transformer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     protected function includeRelations()
33 33
     {
34
-        $relations = [];
34
+        $relations = [ ];
35 35
         foreach ($this->relations as $relation) {
36 36
             if (is_string($relation) && method_exists(static::class, 'transform'.ucfirst(strtolower($relation)))) {
37 37
                 $method = 'transform'.ucfirst(strtolower($relation));
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                 if ($data instanceof JsonResource) {
40 40
                     $data->jsonSerialize();
41 41
                 }
42
-                $relations[strtolower($relation)] = $data;
42
+                $relations[ strtolower($relation) ] = $data;
43 43
             } else {
44 44
                 throw new \Exception('invalid relation or not relation_transform_method given in '.get_short_class_name(static::class));
45 45
             }
Please login to merge, or discard this patch.
src/Foundation/Traits/Cacheable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         return static::$caching;
31 31
     }
32 32
 
33
-    public static function find($id, $columns = ['*'])
33
+    public static function find($id, $columns = [ '*' ])
34 34
     {
35 35
         if (static::cache()->enabled()) {
36 36
             $model = static::cache()->find($id) ?? static::recache($id);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         return $model;
50 50
     }
51 51
 
52
-    public static function findWithoutCache($id, $columns = ['*'])
52
+    public static function findWithoutCache($id, $columns = [ '*' ])
53 53
     {
54 54
         $model = new static();
55 55
         if (is_array($id) || $id instanceof Arrayable) {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             return;
66 66
         }
67 67
 
68
-        if ($columns !== ['*']) {
68
+        if ($columns !== [ '*' ]) {
69 69
             return collect($model)->first($columns);
70 70
         }
71 71
 
Please login to merge, or discard this patch.