Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#1935)
by Cristian
08:51 queued 06:38
created
src/app/Models/Traits/SpatieTranslatable/HasTranslations.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
     public function getAttributeValue($key)
26 26
     {
27
-        if (! $this->isTranslatableAttribute($key)) {
27
+        if (!$this->isTranslatableAttribute($key)) {
28 28
             return parent::getAttributeValue($key);
29 29
         }
30 30
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function update(array $attributes = [], array $options = [])
74 74
     {
75
-        if (! $this->exists) {
75
+        if (!$this->exists) {
76 76
             return false;
77 77
         }
78 78
 
Please login to merge, or discard this patch.
src/app/Models/Traits/SpatieTranslatable/Sluggable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $separator = $config['separator'];
49 49
         $attribute = $attribute.'->'.$this->getLocale();
50 50
 
51
-        return $query->where(function (Builder $q) use ($attribute, $slug, $separator) {
51
+        return $query->where(function(Builder $q) use ($attribute, $slug, $separator) {
52 52
             $q->where($attribute, '=', $slug)
53 53
                 ->orWhere($attribute, 'LIKE', $slug.$separator.'%')
54 54
                 // Fixes issues with Json data types in MySQL where data is sourrounded by "
Please login to merge, or discard this patch.
src/app/Models/Traits/SpatieTranslatable/SlugService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     protected function makeSlugUnique(string $slug, array $config, string $attribute): string
51 51
     {
52
-        if (! $config['unique']) {
52
+        if (!$config['unique']) {
53 53
             return $slug;
54 54
         }
55 55
 
Please login to merge, or discard this patch.
src/app/Models/Traits/CrudTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'json_array');
70 70
         $conn->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('jsonb', 'json_array');
71 71
 
72
-        return ! $conn->getDoctrineColumn($table, $column_name)->getNotnull();
72
+        return !$conn->getDoctrineColumn($table, $column_name)->getNotnull();
73 73
     }
74 74
 
75 75
     /*
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     public function addFakes($columns = ['extras'])
87 87
     {
88 88
         foreach ($columns as $key => $column) {
89
-            if (! isset($this->attributes[$column])) {
89
+            if (!isset($this->attributes[$column])) {
90 90
                 continue;
91 91
             }
92 92
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function shouldDecodeFake($column)
136 136
     {
137
-        return ! in_array($column, array_keys($this->casts));
137
+        return !in_array($column, array_keys($this->casts));
138 138
     }
139 139
 
140 140
     /**
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function shouldEncodeFake($column)
147 147
     {
148
-        return ! in_array($column, array_keys($this->casts));
148
+        return !in_array($column, array_keys($this->casts));
149 149
     }
150 150
 
151 151
     /*
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     public function uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path)
220 220
     {
221 221
         $request = \Request::instance();
222
-        if (! is_array($this->{$attribute_name})) {
222
+        if (!is_array($this->{$attribute_name})) {
223 223
             $attribute_value = json_decode($this->{$attribute_name}, true) ?? [];
224 224
         } else {
225 225
             $attribute_value = $this->{$attribute_name};
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         if ($files_to_clear) {
232 232
             foreach ($files_to_clear as $key => $filename) {
233 233
                 \Storage::disk($disk)->delete($filename);
234
-                $attribute_value = array_where($attribute_value, function ($value, $key) use ($filename) {
234
+                $attribute_value = array_where($attribute_value, function($value, $key) use ($filename) {
235 235
                     return $value != $filename;
236 236
                 });
237 237
             }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Buttons.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
          */
93 93
         $button = $this->buttons()->firstWhere('name', $name);
94 94
 
95
-        if (! $button) {
95
+        if (!$button) {
96 96
             abort(500, 'CRUD Button "'.$name.'" not found. Please check the button exists before you modify it.');
97 97
         }
98 98
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function removeButton($name, $stack = null)
115 115
     {
116
-        $this->setOperationSetting('buttons', $this->buttons()->reject(function ($button) use ($name, $stack) {
116
+        $this->setOperationSetting('buttons', $this->buttons()->reject(function($button) use ($name, $stack) {
117 117
             return $stack == null ? $button->name == $name : ($button->stack == $stack) && ($button->name == $name);
118 118
         }));
119 119
     }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function removeButtons($names, $stack = null)
126 126
     {
127
-        if (! empty($names)) {
127
+        if (!empty($names)) {
128 128
             foreach ($names as $name) {
129 129
                 $this->removeButton($name, $stack);
130 130
             }
@@ -138,14 +138,14 @@  discard block
 block discarded – undo
138 138
 
139 139
     public function removeAllButtonsFromStack($stack)
140 140
     {
141
-        $this->setOperationSetting('buttons', $this->buttons()->reject(function ($button) use ($stack) {
141
+        $this->setOperationSetting('buttons', $this->buttons()->reject(function($button) use ($stack) {
142 142
             return $button->stack == $stack;
143 143
         }));
144 144
     }
145 145
 
146 146
     public function removeButtonFromStack($name, $stack)
147 147
     {
148
-        $this->setOperationSetting('buttons', $this->buttons()->reject(function ($button) use ($name, $stack) {
148
+        $this->setOperationSetting('buttons', $this->buttons()->reject(function($button) use ($name, $stack) {
149 149
             return $button->name == $name && $button->stack == $stack;
150 150
         }));
151 151
     }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
      */
50 50
     public function settings()
51 51
     {
52
-        return \Arr::sort($this->settings, function ($value, $key) {
52
+        return \Arr::sort($this->settings, function($value, $key) {
53 53
             return $key;
54 54
         });
55 55
     }
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Fields.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -38,23 +38,23 @@  discard block
 block discarded – undo
38 38
 
39 39
         // if this is a relation type field and no corresponding model was specified, get it from the relation method
40 40
         // defined in the main model
41
-        if (isset($newField['entity']) && ! isset($newField['model'])) {
41
+        if (isset($newField['entity']) && !isset($newField['model'])) {
42 42
             $newField['model'] = $this->getRelationModel($newField['entity']);
43 43
         }
44 44
 
45 45
         // if the label is missing, we should set it
46
-        if (! isset($newField['label'])) {
46
+        if (!isset($newField['label'])) {
47 47
             $newField['label'] = mb_ucfirst(str_replace('_', ' ', $newField['name']));
48 48
         }
49 49
 
50 50
         // if the field type is missing, we should set it
51
-        if (! isset($newField['type'])) {
51
+        if (!isset($newField['type'])) {
52 52
             $newField['type'] = $this->getFieldTypeFromDbColumnType($newField['name']);
53 53
         }
54 54
 
55 55
         // if a tab was mentioned, we should enable it
56 56
         if (isset($newField['tab'])) {
57
-            if (! $this->tabsEnabled()) {
57
+            if (!$this->tabsEnabled()) {
58 58
                 $this->enableTabs();
59 59
             }
60 60
         }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function afterField($targetFieldName)
91 91
     {
92
-        $this->transformFields(function ($fields) use ($targetFieldName) {
92
+        $this->transformFields(function($fields) use ($targetFieldName) {
93 93
             return $this->moveField($fields, $targetFieldName, false);
94 94
         });
95 95
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function beforeField($targetFieldName)
104 104
     {
105
-        $this->transformFields(function ($fields) use ($targetFieldName) {
105
+        $this->transformFields(function($fields) use ($targetFieldName) {
106 106
             return $this->moveField($fields, $targetFieldName, true);
107 107
         });
108 108
     }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      */
146 146
     public function removeField($name)
147 147
     {
148
-        $this->transformFields(function ($fields) use ($name) {
148
+        $this->transformFields(function($fields) use ($name) {
149 149
             array_forget($fields, $name);
150 150
 
151 151
             return $fields;
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
      */
160 160
     public function removeFields($array_of_names)
161 161
     {
162
-        if (! empty($array_of_names)) {
162
+        if (!empty($array_of_names)) {
163 163
             foreach ($array_of_names as $name) {
164 164
                 $this->removeField($name);
165 165
             }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
     public function removeAllFields()
173 173
     {
174 174
         $current_fields = $this->getCurrentFields();
175
-        if (! empty($current_fields)) {
175
+        if (!empty($current_fields)) {
176 176
             foreach ($current_fields as $field) {
177 177
                 $this->removeField($field['name']);
178 178
             }
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                 $jsonCastables = ['array', 'object', 'json'];
247 247
                 $fieldCasting = $casted_attributes[$field['name']];
248 248
 
249
-                if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && ! empty($data[$field['name']]) && ! is_array($data[$field['name']])) {
249
+                if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && !empty($data[$field['name']]) && !is_array($data[$field['name']])) {
250 250
                     try {
251 251
                         $data[$field['name']] = json_decode($data[$field['name']]);
252 252
                     } catch (\Exception $e) {
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      */
276 276
     public function orderFields($order)
277 277
     {
278
-        $this->transformFields(function ($fields) use ($order) {
278
+        $this->transformFields(function($fields) use ($order) {
279 279
             return $this->applyOrderToFields($fields, $order);
280 280
         });
281 281
     }
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
     public function hasUploadFields()
339 339
     {
340 340
         $fields = $this->getFields();
341
-        $upload_fields = array_where($fields, function ($value, $key) {
341
+        $upload_fields = array_where($fields, function($value, $key) {
342 342
             return isset($value['upload']) && $value['upload'] == true;
343 343
         });
344 344
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/ViewsAndRestoresRevisions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
             $revisionDate = date('Y-m-d', strtotime((string) $history->created_at));
22 22
 
23 23
             // Be sure to instantiate the initial grouping array
24
-            if (! array_key_exists($revisionDate, $revisions)) {
24
+            if (!array_key_exists($revisionDate, $revisions)) {
25 25
                 $revisions[$revisionDate] = [];
26 26
             }
27 27
 
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/HeadingsAndTitles.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function getTitle($action = false)
23 23
     {
24
-        if (! $action) {
24
+        if (!$action) {
25 25
             $action = $this->getActionMethod();
26 26
         }
27 27
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function setTitle($string, $action = false)
40 40
     {
41
-        if (! $action) {
41
+        if (!$action) {
42 42
             $action = $this->getActionMethod();
43 43
         }
44 44
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function getHeading($action = false)
60 60
     {
61
-        if (! $action) {
61
+        if (!$action) {
62 62
             $action = $this->getActionMethod();
63 63
         }
64 64
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function setHeading($string, $action = false)
77 77
     {
78
-        if (! $action) {
78
+        if (!$action) {
79 79
             $action = $this->getActionMethod();
80 80
         }
81 81
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function getSubheading($action = false)
97 97
     {
98
-        if (! $action) {
98
+        if (!$action) {
99 99
             $action = $this->getActionMethod();
100 100
         }
101 101
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     public function setSubheading($string, $action = false)
114 114
     {
115
-        if (! $action) {
115
+        if (!$action) {
116 116
             $action = $this->getActionMethod();
117 117
         }
118 118
 
Please login to merge, or discard this patch.