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

Test Failed
Pull Request — master (#3981)
by
unknown
12:34
created
src/app/Library/CrudPanel/Traits/Create.php 1 patch
Spacing   +6 added lines, -6 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
     }
@@ -161,11 +161,11 @@  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
         foreach ($formattedData['relations'] as $relationMethod => $relationData) {
168
-            if (! isset($relationData['model'])) {
168
+            if (!isset($relationData['model'])) {
169 169
                 continue;
170 170
             }
171 171
             $model = $relationData['model'];
@@ -217,13 +217,13 @@  discard block
 block discarded – undo
217 217
         $relationData = [];
218 218
         foreach ($relation_fields as $relation_field) {
219 219
             $attributeKey = $relation_field['name'];
220
-            if (! is_null(Arr::get($data, $attributeKey)) && isset($relation_field['pivot']) && $relation_field['pivot'] !== true) {
220
+            if (!is_null(Arr::get($data, $attributeKey)) && isset($relation_field['pivot']) && $relation_field['pivot'] !== true) {
221 221
                 $key = implode('.relations.', explode('.', $this->getOnlyRelationEntity($relation_field)));
222 222
                 $fieldData = Arr::get($relationData, 'relations.'.$key, []);
223
-                if (! array_key_exists('model', $fieldData)) {
223
+                if (!array_key_exists('model', $fieldData)) {
224 224
                     $fieldData['model'] = $relation_field['model'];
225 225
                 }
226
-                if (! array_key_exists('parent', $fieldData)) {
226
+                if (!array_key_exists('parent', $fieldData)) {
227 227
                     $fieldData['parent'] = $this->getRelationModel($attributeKey, -1);
228 228
                 }
229 229
                 $relatedAttribute = Arr::last(explode('.', $attributeKey));
Please login to merge, or discard this patch.
src/app/Library/CrudPanel/Traits/FieldsProtectedMethods.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function overwriteFieldNameFromDotNotationToArray($field)
70 70
     {
71
-        if (! is_array($field['name']) && strpos($field['name'], '.') !== false && isset($field['relation_type']) && in_array($field['relation_type'], ['HasOne', 'MorphOne'])) {
71
+        if (!is_array($field['name']) && strpos($field['name'], '.') !== false && isset($field['relation_type']) && in_array($field['relation_type'], ['HasOne', 'MorphOne'])) {
72 72
             $entity_array = explode('.', $field['name']);
73 73
             $name_string = '';
74 74
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             return ['name' => $field];
96 96
         }
97 97
 
98
-        if (is_array($field) && ! isset($field['name'])) {
98
+        if (is_array($field) && !isset($field['name'])) {
99 99
             abort(500, 'All fields must have their name defined');
100 100
         }
101 101
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
     protected function overwriteFieldNameFromEntity($field)
154 154
     {
155 155
         // if the entity doesn't have a dot, it means we don't need to overwrite the name
156
-        if (! Str::contains($field['entity'], '.')) {
156
+        if (!Str::contains($field['entity'], '.')) {
157 157
             return $field;
158 158
         }
159 159
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
         if (count(explode('.', $field['entity'])) == count(explode('.', $this->getOnlyRelationEntity($field)))) {
166 166
             $field['name'] = implode('.', array_slice(explode('.', $field['entity']), 0, -1));
167 167
             $relation = $this->getRelationInstance($field);
168
-            if (! empty($field['name'])) {
168
+            if (!empty($field['name'])) {
169 169
                 $field['name'] .= '.';
170 170
             }
171 171
             $field['name'] .= $relation->getForeignKeyName();
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
     {
179 179
         // if there's a model defined, but no attribute
180 180
         // guess an attribute using the identifiableAttribute functionality in CrudTrait
181
-        if (isset($field['model']) && ! isset($field['attribute']) && method_exists($field['model'], 'identifiableAttribute')) {
181
+        if (isset($field['model']) && !isset($field['attribute']) && method_exists($field['model'], 'identifiableAttribute')) {
182 182
             $field['attribute'] = call_user_func([(new $field['model']), 'identifiableAttribute']);
183 183
         }
184 184
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      */
195 195
     protected function makeSureFieldHasLabel($field)
196 196
     {
197
-        if (! isset($field['label'])) {
197
+        if (!isset($field['label'])) {
198 198
             $name = is_array($field['name']) ? $field['name'][0] : $field['name'];
199 199
             $name = str_replace('_id', '', $name);
200 200
             $field['label'] = mb_ucfirst(str_replace('_', ' ', $name));
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     protected function makeSureFieldHasType($field)
214 214
     {
215
-        if (! isset($field['type'])) {
215
+        if (!isset($field['type'])) {
216 216
             $field['type'] = isset($field['relation_type']) ? $this->inferFieldTypeFromFieldRelation($field) : $this->inferFieldTypeFromDbColumnType($field['name']);
217 217
         }
218 218
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
     {
230 230
         // if a tab was mentioned, we should enable it
231 231
         if (isset($field['tab'])) {
232
-            if (! $this->tabsEnabled()) {
232
+            if (!$this->tabsEnabled()) {
233 233
                 $this->enableTabs();
234 234
             }
235 235
         }
Please login to merge, or discard this patch.