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

Passed
Pull Request — master (#2938)
by Cristian
08:20
created
src/app/Library/CrudPanel/Traits/Create.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
         $all_relation_fields = $this->getRelationFields();
84 84
 
85
-        return Arr::where($all_relation_fields, function ($value, $key) {
85
+        return Arr::where($all_relation_fields, function($value, $key) {
86 86
             return isset($value['pivot']) && $value['pivot'];
87 87
         });
88 88
     }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                             $field_data = json_decode($data[$field['name']], true);
140 140
 
141 141
                             //we grab from the request the specific data for this pivot
142
-                            $pivot_data = Arr::first(Arr::where($field_data, function ($item) use ($pivot_id, $field) {
142
+                            $pivot_data = Arr::first(Arr::where($field_data, function($item) use ($pivot_id, $field) {
143 143
                                 return $item[$field['name']] === $pivot_id;
144 144
                             }));
145 145
 
@@ -183,11 +183,11 @@  discard block
 block discarded – undo
183 183
      */
184 184
     private function createRelationsForItem($item, $formattedData)
185 185
     {
186
-        if (! isset($formattedData['relations'])) {
186
+        if (!isset($formattedData['relations'])) {
187 187
             return false;
188 188
         }
189 189
         foreach ($formattedData['relations'] as $relationMethod => $relationData) {
190
-            if (! isset($relationData['model'])) {
190
+            if (!isset($relationData['model'])) {
191 191
                 continue;
192 192
             }
193 193
             $model = $relationData['model'];
@@ -241,13 +241,13 @@  discard block
 block discarded – undo
241 241
         foreach ($relation_fields as $relation_field) {
242 242
             $attributeKey = $this->parseRelationFieldNamesFromHtml([$relation_field])[0]['name'];
243 243
 
244
-            if (! is_null(Arr::get($data, $attributeKey)) && $relation_field['pivot'] !== true) {
244
+            if (!is_null(Arr::get($data, $attributeKey)) && $relation_field['pivot'] !== true) {
245 245
                 $key = implode('.relations.', explode('.', $this->getOnlyRelationEntity($relation_field)));
246 246
                 $fieldData = Arr::get($relationData, 'relations.'.$key, []);
247
-                if (! array_key_exists('model', $fieldData)) {
247
+                if (!array_key_exists('model', $fieldData)) {
248 248
                     $fieldData['model'] = $relation_field['model'];
249 249
                 }
250
-                if (! array_key_exists('parent', $fieldData)) {
250
+                if (!array_key_exists('parent', $fieldData)) {
251 251
                     $fieldData['parent'] = $this->getRelationModel($attributeKey, -1);
252 252
                 }
253 253
                 $relatedAttribute = Arr::last(explode('.', $attributeKey));
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 
269 269
         $related_method = Arr::last($entity_array);
270 270
 
271
-        if (! method_exists($relation_model, $related_method)) {
271
+        if (!method_exists($relation_model, $related_method)) {
272 272
             if (count($entity_array) <= 1) {
273 273
                 return $relation_field['entity'];
274 274
             } else {
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/Update.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
         foreach ($fields as &$field) {
54 54
             // set the value
55
-            if (! isset($field['value'])) {
55
+            if (!isset($field['value'])) {
56 56
                 if (isset($field['subfields'])) {
57 57
                     $field['value'] = [];
58 58
                     foreach ($field['subfields'] as $subfield) {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         }
66 66
 
67 67
         // always have a hidden input for the entry id
68
-        if (! array_key_exists('id', $fields)) {
68
+        if (!array_key_exists('id', $fields)) {
69 69
             $fields['id'] = [
70 70
                 'name'  => $entry->getKeyName(),
71 71
                 'value' => $entry->getKey(),
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
             $relation_array = explode('.', $relational_entity);
93 93
 
94
-            $relatedModel = $relatedModel = array_reduce(array_splice($relation_array, 0, -1), function ($obj, $method) {
94
+            $relatedModel = $relatedModel = array_reduce(array_splice($relation_array, 0, -1), function($obj, $method) {
95 95
                 return $obj->{$method} ? $obj->{$method} : $obj;
96 96
             }, $model);
97 97
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                 // extra attributes on it. It's a Repeatable Field so its values are sent as json.
105 105
                 if (isset($field['pivot']) && $field['pivot'] && isset($field['fields']) && is_array($field['fields'])) {
106 106
                     //we remove the first field from repeatable because it is our relation.
107
-                    $pivot_fields = Arr::where($field['fields'], function ($item) use ($field) {
107
+                    $pivot_fields = Arr::where($field['fields'], function($item) use ($field) {
108 108
                         return $field['name'] != $item['name'];
109 109
                     });
110 110
 
Please login to merge, or discard this patch.