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
Push — master ( da207d...a1e67c )
by Cristian
03:20
created
src/CrudPanel.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function setModel($model_namespace)
86 86
     {
87
-        if (! class_exists($model_namespace)) {
87
+        if (!class_exists($model_namespace)) {
88 88
             throw new \Exception('This model does not exist.', 404);
89 89
         }
90 90
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     {
126 126
         $complete_route = $route.'.index';
127 127
 
128
-        if (! \Route::has($complete_route)) {
128
+        if (!\Route::has($complete_route)) {
129 129
             throw new \Exception('There are no routes for this route name.', 404);
130 130
         }
131 131
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      */
176 176
     public function getFirstOfItsTypeInArray($type, $array)
177 177
     {
178
-        return array_first($array, function ($item) use ($type) {
178
+        return array_first($array, function($item) use ($type) {
179 179
             return $item['type'] == $type;
180 180
         });
181 181
     }
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
 
193 193
     public function sync($type, $fields, $attributes)
194 194
     {
195
-        if (! empty($this->{$type})) {
196
-            $this->{$type} = array_map(function ($field) use ($fields, $attributes) {
195
+        if (!empty($this->{$type})) {
196
+            $this->{$type} = array_map(function($field) use ($fields, $attributes) {
197 197
                 if (in_array($field['name'], (array) $fields)) {
198 198
                     $field = array_merge($field, $attributes);
199 199
                 }
@@ -219,8 +219,8 @@  discard block
 block discarded – undo
219 219
                 }
220 220
             }
221 221
 
222
-            return $this->{$items} = array_merge($elements, array_filter($this->{$items}, function ($item) use ($items) {
223
-                return ! in_array($item['name'], $this->sort[$items]);
222
+            return $this->{$items} = array_merge($elements, array_filter($this->{$items}, function($item) use ($items) {
223
+                return !in_array($item['name'], $this->sort[$items]);
224 224
             }));
225 225
         }
226 226
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      */
244 244
     private function getRelationModel($relationString)
245 245
     {
246
-        $result = array_reduce(explode('.', $relationString), function ($obj, $method) {
246
+        $result = array_reduce(explode('.', $relationString), function($obj, $method) {
247 247
             return $obj->$method()->getRelated();
248 248
         }, $this->model);
249 249
 
Please login to merge, or discard this patch.
src/PanelTraits/Fields.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,23 +25,23 @@  discard block
 block discarded – undo
25 25
 
26 26
         // if this is a relation type field and no corresponding model was specified, get it from the relation method
27 27
         // defined in the main model
28
-        if (isset($complete_field_array['entity']) && ! isset($complete_field_array['model'])) {
28
+        if (isset($complete_field_array['entity']) && !isset($complete_field_array['model'])) {
29 29
             $complete_field_array['model'] = $this->getRelationModel($complete_field_array['entity']);
30 30
         }
31 31
 
32 32
         // if the label is missing, we should set it
33
-        if (! isset($complete_field_array['label'])) {
33
+        if (!isset($complete_field_array['label'])) {
34 34
             $complete_field_array['label'] = ucfirst($complete_field_array['name']);
35 35
         }
36 36
 
37 37
         // if the field type is missing, we should set it
38
-        if (! isset($complete_field_array['type'])) {
38
+        if (!isset($complete_field_array['type'])) {
39 39
             $complete_field_array['type'] = $this->getFieldTypeFromDbColumnType($complete_field_array['name']);
40 40
         }
41 41
 
42 42
         // if a tab was mentioned, we should enable it
43 43
         if (isset($complete_field_array['tab'])) {
44
-            if (! $this->tabsEnabled()) {
44
+            if (!$this->tabsEnabled()) {
45 45
                 $this->enableTabs();
46 46
             }
47 47
         }
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public function removeFields($array_of_names, $form = 'both')
156 156
     {
157
-        if (! empty($array_of_names)) {
157
+        if (!empty($array_of_names)) {
158 158
             foreach ($array_of_names as $name) {
159 159
                 $this->removeField($name, $form);
160 160
             }
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 $jsonCastables = ['array', 'object', 'json'];
219 219
                 $fieldCasting = $casted_attributes[$field['name']];
220 220
 
221
-                if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && ! empty($data[$field['name']]) && ! is_array($data[$field['name']])) {
221
+                if (in_array($fieldCasting, $jsonCastables) && isset($data[$field['name']]) && !empty($data[$field['name']]) && !is_array($data[$field['name']])) {
222 222
                     try {
223 223
                         $data[$field['name']] = json_decode($data[$field['name']]);
224 224
                     } catch (Exception $e) {
Please login to merge, or discard this patch.
src/PanelTraits/Columns.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function addColumn($column)
55 55
     {
56 56
         // if a string was passed, not an array, change it to an array
57
-        if (! is_array($column)) {
57
+        if (!is_array($column)) {
58 58
             $column = ['name' => $column];
59 59
         }
60 60
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $column_with_details = $this->addDefaultLabel($column);
63 63
 
64 64
         // make sure the column has a name
65
-        if (! array_key_exists('name', $column_with_details)) {
65
+        if (!array_key_exists('name', $column_with_details)) {
66 66
             $column_with_details['name'] = 'anonymous_column_'.str_random(5);
67 67
         }
68 68
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
         // if this is a relation type field and no corresponding model was specified, get it from the relation method
72 72
         // defined in the main model
73
-        if (isset($column_with_details['entity']) && ! isset($column_with_details['model'])) {
73
+        if (isset($column_with_details['entity']) && !isset($column_with_details['model'])) {
74 74
             $column_with_details['model'] = $this->getRelationModel($column_with_details['entity']);
75 75
         }
76 76
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      */
148 148
     public function addDefaultLabel($array)
149 149
     {
150
-        if (! array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) {
150
+        if (!array_key_exists('label', (array) $array) && array_key_exists('name', (array) $array)) {
151 151
             $array = array_merge(['label' => ucfirst($this->makeLabel($array['name']))], $array);
152 152
 
153 153
             return $array;
@@ -181,8 +181,8 @@  discard block
 block discarded – undo
181 181
      */
182 182
     public function remove($entity, $fields)
183 183
     {
184
-        return array_values(array_filter($this->{$entity}, function ($field) use ($fields) {
185
-            return ! in_array($field['name'], (array) $fields);
184
+        return array_values(array_filter($this->{$entity}, function($field) use ($fields) {
185
+            return !in_array($field['name'], (array) $fields);
186 186
         }));
187 187
     }
188 188
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
     {
234 234
         $columns = $this->getColumns();
235 235
 
236
-        return collect($columns)->pluck('entity')->reject(function ($value, $key) {
236
+        return collect($columns)->pluck('entity')->reject(function($value, $key) {
237 237
             return $value == null;
238 238
         })->toArray();
239 239
     }
Please login to merge, or discard this patch.
src/app/Http/Controllers/CrudFeatures/AjaxTable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
         // create an array with the names of the searchable columns
16 16
         $columns = collect($this->crud->columns)
17
-                    ->reject(function ($column, $key) {
17
+                    ->reject(function($column, $key) {
18 18
                         // the select_multiple, model_function and model_function_attribute columns are not searchable
19 19
                         return isset($column['type']) && ($column['type'] == 'select_multiple' || $column['type'] == 'model_function' || $column['type'] == 'model_function_attribute');
20 20
                     })
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
         $dataTable = new \LiveControl\EloquentDataTable\DataTable($this->crud->query, $columns);
30 30
 
31 31
         // make the datatable use the column types instead of just echoing the text
32
-        $dataTable->setFormatRowFunction(function ($entry) {
32
+        $dataTable->setFormatRowFunction(function($entry) {
33 33
             // get the actual HTML for each row's cell
34 34
             $row_items = $this->crud->getRowViews($entry, $this->crud);
35 35
 
Please login to merge, or discard this patch.