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 — main (#4267)
by Pedro
11:30
created
src/app/Library/CrudPanel/Traits/Update.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         }
59 59
 
60 60
         // always have a hidden input for the entry id
61
-        if (! array_key_exists('id', $fields)) {
61
+        if (!array_key_exists('id', $fields)) {
62 62
             $fields['id'] = [
63 63
                 'name' => $entry->getKeyName(),
64 64
                 'value' => $entry->getKey(),
@@ -83,12 +83,12 @@  discard block
 block discarded – undo
83 83
         $fieldEntity = $field['entity'] ?? false;
84 84
         $fakeField = $field['fake'] ?? false;
85 85
 
86
-        if ($fieldEntity && ! $fakeField) {
86
+        if ($fieldEntity && !$fakeField) {
87 87
             return $this->getModelAttributeValueFromRelationship($model, $field);
88 88
         }
89 89
 
90 90
         if ($this->holdsMultipleInputs($field['name'])) {
91
-            $result = array_map(function ($item) use ($model) {
91
+            $result = array_map(function($item) use ($model) {
92 92
                 return $model->{$item};
93 93
             }, explode(',', $field['name']));
94 94
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         [$relatedModel, $relationMethod] = $this->getModelAndMethodFromEntity($model, $field);
112 112
 
113
-        if (! method_exists($relatedModel, $relationMethod)) {
113
+        if (!method_exists($relatedModel, $relationMethod)) {
114 114
             return $relatedModel->{$relationMethod};
115 115
         }
116 116
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                     $model = $this->setupRelatedModelLocale($model);
130 130
                     // when subfields are NOT set we don't need to get any more values
131 131
                     // we just return the plain models as we only need the ids
132
-                    if (! isset($field['subfields'])) {
132
+                    if (!isset($field['subfields'])) {
133 133
                         $result->push($model);
134 134
 
135 135
                         continue;
@@ -157,13 +157,13 @@  discard block
 block discarded – undo
157 157
                 break;
158 158
             case 'HasOne':
159 159
             case 'MorphOne':
160
-                if (! method_exists($relatedModel, $relationMethod)) {
160
+                if (!method_exists($relatedModel, $relationMethod)) {
161 161
                     return;
162 162
                 }
163 163
 
164 164
                 $model = $relatedModel->{$relationMethod};
165 165
 
166
-                if (! $model) {
166
+                if (!$model) {
167 167
                     return;
168 168
                 }
169 169
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 
246 246
         $relationArray = explode('.', $relationEntity);
247 247
 
248
-        $relatedModel = array_reduce(array_splice($relationArray, 0, -1), function ($obj, $method) {
248
+        $relatedModel = array_reduce(array_splice($relationArray, 0, -1), function($obj, $method) {
249 249
             // if the string ends with `_id` we strip it out
250 250
             $method = Str::endsWith($method, '_id') ? Str::replaceLast('_id', '', $method) : $method;
251 251
 
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
             // if the subfield name does not contain a dot we just need to check
273 273
             // if it has subfields and return the result accordingly.
274 274
             foreach ((array) $subfield['name'] as $name) {
275
-                if (! Str::contains($name, '.')) {
275
+                if (!Str::contains($name, '.')) {
276 276
                     // when subfields are present, $relatedModel->{$name} returns a model instance
277 277
                     // otherwise returns the model attribute.
278 278
                     if ($relatedModel->{$name} && isset($subfield['subfields'])) {
Please login to merge, or discard this patch.