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 (#3747)
by Cristian
14:14
created
src/app/Library/CrudPanel/Traits/Create.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         $all_relation_fields = $this->getRelationFields();
85 85
 
86
-        return Arr::where($all_relation_fields, function ($value, $key) {
86
+        return Arr::where($all_relation_fields, function($value, $key) {
87 87
             return isset($value['pivot']) && $value['pivot'];
88 88
         });
89 89
     }
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
      */
163 163
     private function createRelationsForItem($item, $formattedData)
164 164
     {
165
-        if (! isset($formattedData['relations'])) {
165
+        if (!isset($formattedData['relations'])) {
166 166
             return false;
167 167
         }
168 168
         foreach ($formattedData['relations'] as $relationMethod => $relationData) {
169
-            if (! isset($relationData['model'])) {
169
+            if (!isset($relationData['model'])) {
170 170
                 continue;
171 171
             }
172 172
             $model = $relationData['model'];
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
                     ->where($relation_foreign_key, $item->{$relation_local_key})
229 229
                     ->update([$relation_foreign_key => $relationData['fallback_id']]);
230 230
             } else {
231
-                if (! $relation_column_is_nullable || $force_delete) {
231
+                if (!$relation_column_is_nullable || $force_delete) {
232 232
                     $model_instance->whereNotIn($model_instance->getKeyName(), $relation_values)
233 233
                         ->where($relation_foreign_key, $item->{$relation_local_key})
234 234
                         ->delete();
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                 $model_instance->where($relation_foreign_key, $item->{$relation_local_key})
246 246
                     ->update([$relation_foreign_key => $relationData['fallback_id']]);
247 247
             } else {
248
-                if (! $relation_column_is_nullable || $force_delete) {
248
+                if (!$relation_column_is_nullable || $force_delete) {
249 249
                     $model_instance->where($relation_foreign_key, $item->{$relation_local_key})->delete();
250 250
                 } else {
251 251
                     $model_instance->where($relation_foreign_key, $item->{$relation_local_key})
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         $relation_fields = $this->parseRelationFieldNamesFromHtml($relation_fields);
281 281
 
282 282
         //remove fields that are not in the submitted form.
283
-        $relation_fields = array_filter($relation_fields, function ($item) use ($data) {
283
+        $relation_fields = array_filter($relation_fields, function($item) use ($data) {
284 284
             return Arr::has($data, $item['name']);
285 285
         });
286 286
 
@@ -291,10 +291,10 @@  discard block
 block discarded – undo
291 291
             if (isset($relation_field['pivot']) && $relation_field['pivot'] !== true) {
292 292
                 $key = implode('.relations.', explode('.', $this->getOnlyRelationEntity($relation_field)));
293 293
                 $fieldData = Arr::get($relationData, 'relations.'.$key, []);
294
-                if (! array_key_exists('model', $fieldData)) {
294
+                if (!array_key_exists('model', $fieldData)) {
295 295
                     $fieldData['model'] = $relation_field['model'];
296 296
                 }
297
-                if (! array_key_exists('parent', $fieldData)) {
297
+                if (!array_key_exists('parent', $fieldData)) {
298 298
                     $fieldData['parent'] = $this->getRelationModel($attributeKey, -1);
299 299
                 }
300 300
                 $relatedAttribute = Arr::last(explode('.', $attributeKey));
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 
316 316
         $related_method = Arr::last($entity_array);
317 317
 
318
-        if (! method_exists($relation_model, $related_method)) {
318
+        if (!method_exists($relation_model, $related_method)) {
319 319
             if (count($entity_array) <= 1) {
320 320
                 return $relation_field['entity'];
321 321
             } else {
Please login to merge, or discard this patch.