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 (#1556)
by Thomas
07:32
created
src/PanelTraits/Create.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $all_relation_fields = $this->getRelationFields($form);
92 92
 
93
-        return array_where($all_relation_fields, function ($value, $key) {
93
+        return array_where($all_relation_fields, function($value, $key) {
94 94
             return isset($value['pivot']) && $value['pivot'];
95 95
         });
96 96
     }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      */
162 162
     private function createRelationsForItem($item, $formattedData)
163 163
     {
164
-        if (! isset($formattedData['relations'])) {
164
+        if (!isset($formattedData['relations'])) {
165 165
             return false;
166 166
         }
167 167
 
@@ -219,11 +219,11 @@  discard block
 block discarded – undo
219 219
                 $key = implode('.relations.', explode('.', $relationField['entity']));
220 220
                 $fieldData = array_get($relationData, 'relations.'.$key, []);
221 221
 
222
-                if (! array_key_exists('model', $fieldData)) {
222
+                if (!array_key_exists('model', $fieldData)) {
223 223
                     $fieldData['model'] = $relationField['model'];
224 224
                 }
225 225
 
226
-                if (! array_key_exists('parent', $fieldData)) {
226
+                if (!array_key_exists('parent', $fieldData)) {
227 227
                     $fieldData['parent'] = $this->getRelationModel($relationField['entity'], -1);
228 228
                 }
229 229
 
Please login to merge, or discard this patch.
src/resources/views/filters/range.blade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
 					<?php
10 10
 						$from = '';
11 11
 						$to = '';
12
-						if($filter->currentValue) {
13
-							$range = (array)json_decode($filter->currentValue);
12
+						if ($filter->currentValue) {
13
+							$range = (array) json_decode($filter->currentValue);
14 14
 							$from = $range['from'];
15 15
 							$to = $range['to'];
16 16
 						}
Please login to merge, or discard this patch.
src/PanelTraits/Read.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $id = $this->getCurrentEntryId();
43 43
 
44
-        if (! $id) {
44
+        if (!$id) {
45 45
             return false;
46 46
         }
47 47
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      */
58 58
     public function getEntry($id)
59 59
     {
60
-        if (! $this->entry) {
60
+        if (!$this->entry) {
61 61
             $this->entry = $this->model->findOrFail($id);
62 62
             $this->entry = $this->entry->withFakes();
63 63
         }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     public function hasUploadFields($form, $id = false)
133 133
     {
134 134
         $fields = $this->getFields($form, $id);
135
-        $upload_fields = array_where($fields, function ($value, $key) {
135
+        $upload_fields = array_where($fields, function($value, $key) {
136 136
             return isset($value['upload']) && $value['upload'] == true;
137 137
         });
138 138
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     {
193 193
         // If the default Page Length isn't in the menu's values, Add it the beginnin and resort all to show a croissant list.
194 194
         // assume both array are the same lenght.
195
-        if (! in_array($this->getDefaultPageLength(), $this->page_length_menu[0])) {
195
+        if (!in_array($this->getDefaultPageLength(), $this->page_length_menu[0])) {
196 196
             // Loop through 2 arrays of prop. page_length_menu
197 197
             foreach ($this->page_length_menu as $key => &$page_length_choices) {
198 198
                 // This is a condition that should be always true.
@@ -223,9 +223,9 @@  discard block
 block discarded – undo
223 223
     public function getPageLengthMenu()
224 224
     {
225 225
         // if already set, use that
226
-        if (! $this->page_length_menu) {
226
+        if (!$this->page_length_menu) {
227 227
             // try to get the menu settings from the config file
228
-            if (! $this->page_length_menu = config('backpack.crud.page_length_menu')) {
228
+            if (!$this->page_length_menu = config('backpack.crud.page_length_menu')) {
229 229
                 // otherwise set a sensible default
230 230
                 $this->page_length_menu = [[10, 25, 50, 100, -1], [10, 25, 50, 100, 'backpack::crud.all']];
231 231
             }
Please login to merge, or discard this patch.
src/public/ckeditor/samples/old/assets/posteddata.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@
 block discarded – undo
25 25
 		</thead>
26 26
 <?php
27 27
 
28
-if (! empty($_POST)) {
28
+if (!empty($_POST)) {
29 29
     foreach ($_POST as $key => $value) {
30
-        if ((! is_string($value) && ! is_numeric($value)) || ! is_string($key)) {
30
+        if ((!is_string($value) && !is_numeric($value)) || !is_string($key)) {
31 31
             continue;
32 32
         }
33 33
 
Please login to merge, or discard this patch.
src/PanelTraits/Access.php 1 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.
src/app/Console/Commands/Install.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
                     $this->executeProcess('mkdir -p public/uploads');
54 54
                     break;
55 55
                 case '\\': // windows
56
-                    if (! file_exists('public\uploads')) {
56
+                    if (!file_exists('public\uploads')) {
57 57
                         $this->executeProcess('mkdir public\uploads');
58 58
                     }
59 59
                     break;
Please login to merge, or discard this patch.
src/PanelTraits/Fields.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,28 +26,28 @@  discard block
 block discarded – undo
26 26
 
27 27
         // if this is a relation type field and no corresponding model was specified, get it from the relation method
28 28
         // defined in the main model
29
-        if (isset($completeFieldsArray['entity']) && ! isset($completeFieldsArray['model'])) {
29
+        if (isset($completeFieldsArray['entity']) && !isset($completeFieldsArray['model'])) {
30 30
             $completeFieldsArray['model'] = $this->getRelationModel($completeFieldsArray['entity']);
31 31
         }
32 32
 
33 33
         // if the label is missing, we should set it
34
-        if (! isset($completeFieldsArray['label'])) {
34
+        if (!isset($completeFieldsArray['label'])) {
35 35
             $completeFieldsArray['label'] = ucfirst($completeFieldsArray['name']);
36 36
         }
37 37
 
38 38
         // if the field type is missing, we should set it
39
-        if (! isset($completeFieldsArray['type'])) {
39
+        if (!isset($completeFieldsArray['type'])) {
40 40
             $completeFieldsArray['type'] = $this->getFieldTypeFromDbColumnType($completeFieldsArray['name']);
41 41
         }
42 42
 
43 43
         // if a tab was mentioned, we should enable it
44 44
         if (isset($completeFieldsArray['tab'])) {
45
-            if (! $this->tabsEnabled()) {
45
+            if (!$this->tabsEnabled()) {
46 46
                 $this->enableTabs();
47 47
             }
48 48
         }
49 49
 
50
-        $this->transformFields($form, function ($fields) use ($completeFieldsArray) {
50
+        $this->transformFields($form, function($fields) use ($completeFieldsArray) {
51 51
             $fields[$completeFieldsArray['name']] = $completeFieldsArray;
52 52
 
53 53
             return $fields;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function afterField($targetFieldName, $form = 'both')
81 81
     {
82
-        $this->transformFields($form, function ($fields) use ($targetFieldName) {
82
+        $this->transformFields($form, function($fields) use ($targetFieldName) {
83 83
             return $this->moveField($fields, $targetFieldName, false);
84 84
         });
85 85
     }
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function beforeField($targetFieldName, $form = 'both')
94 94
     {
95
-        $this->transformFields($form, function ($fields) use ($targetFieldName) {
95
+        $this->transformFields($form, function($fields) use ($targetFieldName) {
96 96
             return $this->moveField($fields, $targetFieldName, true);
97 97
         });
98 98
     }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function removeField($name, $form = 'both')
136 136
     {
137
-        $this->transformFields($form, function ($fields) use ($name) {
137
+        $this->transformFields($form, function($fields) use ($name) {
138 138
             array_forget($fields, $name);
139 139
 
140 140
             return $fields;
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      */
150 150
     public function removeFields($array_of_names, $form = 'both')
151 151
     {
152
-        if (! empty($array_of_names)) {
152
+        if (!empty($array_of_names)) {
153 153
             foreach ($array_of_names as $name) {
154 154
                 $this->removeField($name, $form);
155 155
             }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     public function removeAllFields($form = 'both')
165 165
     {
166 166
         $current_fields = $this->getCurrentFields();
167
-        if (! empty($current_fields)) {
167
+        if (!empty($current_fields)) {
168 168
             foreach ($current_fields as $field) {
169 169
                 $this->removeField($field['name'], $form);
170 170
             }
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
                 $jsonCastables = ['array', 'object', 'json'];
228 228
                 $fieldCasting = $casted_attributes[$field['name']];
229 229
 
230
-                if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && ! empty($data[$field['name']]) && ! is_array($data[$field['name']])) {
230
+                if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && !empty($data[$field['name']]) && !is_array($data[$field['name']])) {
231 231
                     try {
232 232
                         $data[$field['name']] = json_decode($data[$field['name']]);
233 233
                     } catch (\Exception $e) {
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      */
259 259
     public function orderFields($order, $form = 'both')
260 260
     {
261
-        $this->transformFields($form, function ($fields) use ($order) {
261
+        $this->transformFields($form, function($fields) use ($order) {
262 262
             return $this->applyOrderToFields($fields, $order);
263 263
         });
264 264
     }
Please login to merge, or discard this patch.
src/app/Console/Commands/Publish.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $sourceFile = $this->sourcePath.$file.'.blade.php';
74 74
         $copiedFile = $this->destinationPath.$file.'.blade.php';
75 75
 
76
-        if (! file_exists($sourceFile)) {
76
+        if (!file_exists($sourceFile)) {
77 77
             return $this->error(
78 78
                 'Cannot find source view file at '
79 79
                 .$sourceFile.
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             if ($canCopy) {
94 94
                 $path = pathinfo($copiedFile);
95 95
 
96
-                if (! file_exists($path['dirname'])) {
96
+                if (!file_exists($path['dirname'])) {
97 97
                     mkdir($path['dirname'], 0755, true);
98 98
                 }
99 99
 
Please login to merge, or discard this patch.
src/PanelTraits/Search.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function applySearchTerm($searchTerm)
21 21
     {
22
-        return $this->query->where(function ($query) use ($searchTerm) {
22
+        return $this->query->where(function($query) use ($searchTerm) {
23 23
             foreach ($this->getColumns() as $column) {
24
-                if (! isset($column['type'])) {
24
+                if (!isset($column['type'])) {
25 25
                     abort(400, 'Missing column type when trying to apply search term.');
26 26
                 }
27 27
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
                 case 'select':
62 62
                 case 'select_multiple':
63
-                    $query->orWhereHas($column['entity'], function ($q) use ($column, $searchTerm) {
63
+                    $query->orWhereHas($column['entity'], function($q) use ($column, $searchTerm) {
64 64
                         $q->where($column['attribute'], 'like', '%'.$searchTerm.'%');
65 65
                     });
66 66
                     break;
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
      */
178 178
     private function renderCellView($view, $column, $entry, $rowNumber = false)
179 179
     {
180
-        if (! view()->exists($view)) {
180
+        if (!view()->exists($view)) {
181 181
             $view = 'crud::columns.text'; // fallback to text column
182 182
         }
183 183
 
Please login to merge, or discard this patch.