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 (#1975)
by Eduard
03:16
created
src/CrudTrait.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      *
70 70
      * @param array $columns - the database columns that contain the JSONs
71 71
      *
72
-     * @return Model
72
+     * @return CrudTrait
73 73
      */
74 74
     public function withFakes($columns = [])
75 75
     {
Please login to merge, or discard this 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/resources/views-elfinder/filepicker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     <!-- Include jQuery, jQuery UI, elFinder (REQUIRED) -->
27 27
 
28 28
     <?php
29
-    $mimeTypes = implode(',', array_map(function ($t) {
29
+    $mimeTypes = implode(',', array_map(function($t) {
30 30
         return "'".$t."'";
31 31
     }, explode(',', $type)));
32 32
     ?>
Please login to merge, or discard this patch.
src/PanelTraits/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/PanelTraits/Filters.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
 
125 125
     /**
126 126
      * Determine if the current CRUD action is a list operation (using standard or ajax DataTables).
127
-     * @return bool
127
+     * @return boolean|null
128 128
      */
129 129
     public function doingListOperation()
130 130
     {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
      */
12 12
     public function filtersEnabled()
13 13
     {
14
-        return ! is_array($this->filters);
14
+        return !is_array($this->filters);
15 15
     }
16 16
 
17 17
     /**
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $this->enableFilters();
60 60
 
61 61
         // check if another filter with the same name exists
62
-        if (! isset($options['name'])) {
62
+        if (!isset($options['name'])) {
63 63
             abort(500, 'All your filters need names.');
64 64
         }
65 65
         if ($this->filters->contains('name', $options['name'])) {
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     {
161 161
         $filter = $this->filters->firstWhere('name', $name);
162 162
 
163
-        if (! $filter) {
163
+        if (!$filter) {
164 164
             abort(500, 'CRUD Filter "'.$name.'" not found. Please check the filter exists before you modify it.');
165 165
         }
166 166
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
     public function removeFilter($name)
177 177
     {
178
-        $this->filters = $this->filters->reject(function ($filter) use ($name) {
178
+        $this->filters = $this->filters->reject(function($filter) use ($name) {
179 179
             return $filter->name == $name;
180 180
         });
181 181
     }
@@ -259,16 +259,16 @@  discard block
 block discarded – undo
259 259
 
260 260
     public function checkOptionsIntegrity($options)
261 261
     {
262
-        if (! isset($options['name'])) {
262
+        if (!isset($options['name'])) {
263 263
             abort(500, 'Please make sure all your filters have names.');
264 264
         }
265
-        if (! isset($options['type'])) {
265
+        if (!isset($options['type'])) {
266 266
             abort(500, 'Please make sure all your filters have types.');
267 267
         }
268
-        if (! \View::exists('crud::filters.'.$options['type'])) {
268
+        if (!\View::exists('crud::filters.'.$options['type'])) {
269 269
             abort(500, 'No filter view named "'.$options['type'].'.blade.php" was found.');
270 270
         }
271
-        if (! isset($options['label'])) {
271
+        if (!isset($options['label'])) {
272 272
             abort(500, 'Please make sure all your filters have labels.');
273 273
         }
274 274
     }
Please login to merge, or discard this patch.
src/ModelTraits/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/resources/views/fields/checklist_dependency.blade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         }
25 25
 
26 26
       //for update form, get initial state of the entity
27
-      if( isset($id) && $id ){
27
+      if (isset($id) && $id) {
28 28
 
29 29
         //get entity with relations for primary dependency
30 30
         $entity_dependencies = $entity_model->with($primary_dependency['entity'])
Please login to merge, or discard this patch.
src/PanelTraits/FakeColumns.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,19 +24,19 @@
 block discarded – undo
24 24
             if (isset($field['fake']) && $field['fake'] == true) {
25 25
                 // add it to the request in its appropriate variable - the one defined, if defined
26 26
                 if (isset($field['store_in'])) {
27
-                    if (! in_array($field['store_in'], $fakeFieldsColumnsArray, true)) {
27
+                    if (!in_array($field['store_in'], $fakeFieldsColumnsArray, true)) {
28 28
                         array_push($fakeFieldsColumnsArray, $field['store_in']);
29 29
                     }
30 30
                 } else {
31 31
                     //otherwise in the one defined in the $crud variable
32
-                    if (! in_array('extras', $fakeFieldsColumnsArray, true)) {
32
+                    if (!in_array('extras', $fakeFieldsColumnsArray, true)) {
33 33
                         array_push($fakeFieldsColumnsArray, 'extras');
34 34
                     }
35 35
                 }
36 36
             }
37 37
         }
38 38
 
39
-        if (! count($fakeFieldsColumnsArray)) {
39
+        if (!count($fakeFieldsColumnsArray)) {
40 40
             $fakeFieldsColumnsArray = ['extras'];
41 41
         }
42 42
 
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
      * been found.
10 10
      *
11 11
      * @param string   $form The CRUD form. Can be 'create', 'update' or 'both'. Default is 'create'.
12
-     * @param int|bool $id   Optional entity ID needed in the case of the update form.
12
+     * @param integer $id   Optional entity ID needed in the case of the update form.
13 13
      *
14 14
      * @return array The fake columns array.
15 15
      */
Please login to merge, or discard this patch.
src/PanelTraits/Delete.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      *
16 16
      * @param  int $id The id of the item to be deleted.
17 17
      *
18
-     * @return bool True if the item was deleted.
18
+     * @return string True if the item was deleted.
19 19
      *
20 20
      * @throws \Illuminate\Database\Eloquent\ModelNotFoundException if the model was not found.
21 21
      *
Please login to merge, or discard this patch.
src/PanelTraits/Access.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -12,12 +12,18 @@
 block discarded – undo
12 12
     |--------------------------------------------------------------------------
13 13
     */
14 14
 
15
+    /**
16
+     * @param string $access
17
+     */
15 18
     public function allowAccess($access)
16 19
     {
17 20
         // $this->addButtons((array)$access);
18 21
         return $this->access = array_merge(array_diff((array) $access, $this->access), $this->access);
19 22
     }
20 23
 
24
+    /**
25
+     * @param string $access
26
+     */
21 27
     public function denyAccess($access)
22 28
     {
23 29
         // $this->removeButtons((array)$access);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function hasAccess($permission)
35 35
     {
36
-        if (! in_array($permission, $this->access)) {
36
+        if (!in_array($permission, $this->access)) {
37 37
             return false;
38 38
         }
39 39
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function hasAccessToAll($permission_array)
69 69
     {
70 70
         foreach ($permission_array as $key => $permission) {
71
-            if (! in_array($permission, $this->access)) {
71
+            if (!in_array($permission, $this->access)) {
72 72
                 return false;
73 73
             }
74 74
         }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function hasAccessOrFail($permission)
88 88
     {
89
-        if (! in_array($permission, $this->access)) {
89
+        if (!in_array($permission, $this->access)) {
90 90
             throw new AccessDeniedException(trans('backpack::crud.unauthorized_access', ['access' => $permission]));
91 91
         }
92 92
 
Please login to merge, or discard this patch.