We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -326,8 +326,6 @@ discard block |
||
326 | 326 | * Check if the create/update form has upload fields. |
327 | 327 | * Upload fields are the ones that have "upload" => true defined on them. |
328 | 328 | * |
329 | - * @param string $form create/update/both - defaults to 'both' |
|
330 | - * @param bool|int $id id of the entity - defaults to false |
|
331 | 329 | * |
332 | 330 | * @return bool |
333 | 331 | */ |
@@ -358,7 +356,7 @@ discard block |
||
358 | 356 | /** |
359 | 357 | * Set an array of field type names as already loaded for the current operation. |
360 | 358 | * |
361 | - * @param array $fieldTypes |
|
359 | + * @param string[] $fieldTypes |
|
362 | 360 | */ |
363 | 361 | public function setLoadedFieldTypes($fieldTypes) |
364 | 362 | { |
@@ -369,7 +367,7 @@ discard block |
||
369 | 367 | * Get a namespaced version of the field type name. |
370 | 368 | * Appends the 'view_namespace' attribute of the field to the `type', using dot notation. |
371 | 369 | * |
372 | - * @param mixed $field |
|
370 | + * @param string $field |
|
373 | 371 | * @return string Namespaced version of the field type name. Ex: 'text', 'custom.view.path.text' |
374 | 372 | */ |
375 | 373 | public function getFieldTypeWithNamespace($field) |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | //check if column exists in database |
73 | 73 | $conn->getDoctrineColumn($table, $column_name); |
74 | 74 | |
75 | - return ! $conn->getDoctrineColumn($table, $column_name)->getNotnull(); |
|
75 | + return !$conn->getDoctrineColumn($table, $column_name)->getNotnull(); |
|
76 | 76 | } catch (\Exception $e) { |
77 | 77 | return true; |
78 | 78 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | public function addFakes($columns = ['extras']) |
93 | 93 | { |
94 | 94 | foreach ($columns as $key => $column) { |
95 | - if (! isset($this->attributes[$column])) { |
|
95 | + if (!isset($this->attributes[$column])) { |
|
96 | 96 | continue; |
97 | 97 | } |
98 | 98 | |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | */ |
142 | 142 | public function shouldDecodeFake($column) |
143 | 143 | { |
144 | - return ! in_array($column, array_keys($this->casts)); |
|
144 | + return !in_array($column, array_keys($this->casts)); |
|
145 | 145 | } |
146 | 146 | |
147 | 147 | /** |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function shouldEncodeFake($column) |
155 | 155 | { |
156 | - return ! in_array($column, array_keys($this->casts)); |
|
156 | + return !in_array($column, array_keys($this->casts)); |
|
157 | 157 | } |
158 | 158 | |
159 | 159 | /* |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | public function uploadMultipleFilesToDisk($value, $attribute_name, $disk, $destination_path) |
228 | 228 | { |
229 | 229 | $request = \Request::instance(); |
230 | - if (! is_array($this->{$attribute_name})) { |
|
230 | + if (!is_array($this->{$attribute_name})) { |
|
231 | 231 | $attribute_value = json_decode($this->{$attribute_name}, true) ?? []; |
232 | 232 | } else { |
233 | 233 | $attribute_value = $this->{$attribute_name}; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | if ($files_to_clear) { |
240 | 240 | foreach ($files_to_clear as $key => $filename) { |
241 | 241 | \Storage::disk($disk)->delete($filename); |
242 | - $attribute_value = array_where($attribute_value, function ($value, $key) use ($filename) { |
|
242 | + $attribute_value = array_where($attribute_value, function($value, $key) use ($filename) { |
|
243 | 243 | return $value != $filename; |
244 | 244 | }); |
245 | 245 | } |
@@ -58,6 +58,9 @@ |
||
58 | 58 | $this->crud->applyConfigurationFromSettings('create'); |
59 | 59 | } |
60 | 60 | |
61 | + /** |
|
62 | + * @param string $action |
|
63 | + */ |
|
61 | 64 | public function getModalContent($entity, $action, $fields) |
62 | 65 | { |
63 | 66 | return view( |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $field['model'] = $field['model'] ?? $this->crud->getRelationModel($field['entity']); |
82 | 82 | $relatedModelInstance = new $field['model'](); |
83 | 83 | if ($field) { |
84 | - if (! isset($field['options'])) { |
|
84 | + if (!isset($field['options'])) { |
|
85 | 85 | $options = $field['model']::all()->pluck($field['attribute'], $relatedModelInstance->getKeyName()); |
86 | 86 | } else { |
87 | 87 | $options = call_user_func($field['options'], $field['model']::query()->pluck($field['attribute'], $relatedModelInstance->getKeyName())); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | /** |
88 | 88 | * Gets the relation data from the method in the model. |
89 | 89 | * |
90 | - * @param ReflectionMethod $method |
|
90 | + * @param \ReflectionMethod $method |
|
91 | 91 | * @return array |
92 | 92 | */ |
93 | 93 | public function getRelationData($method) |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | * Based on relation type returns if relation allows multiple entities. |
119 | 119 | * |
120 | 120 | * @param string $relationType |
121 | - * @return bool |
|
121 | + * @return boolean|null |
|
122 | 122 | */ |
123 | 123 | public function relationAllowsMultiple($relationType) |
124 | 124 | { |
@@ -52,9 +52,9 @@ |
||
52 | 52 | public function checkIfFieldNameBelongsToAnyRelation($fieldName) |
53 | 53 | { |
54 | 54 | $relations = $this->getAvailableRelationsInModel(); |
55 | - if (! empty($relations)) { |
|
55 | + if (!empty($relations)) { |
|
56 | 56 | if (in_array($fieldName, array_column($relations, 'name'))) { |
57 | - return array_filter($relations, function ($arr) use ($fieldName) { |
|
57 | + return array_filter($relations, function($arr) use ($fieldName) { |
|
58 | 58 | if (isset($arr['name'])) { |
59 | 59 | return $arr['name'] == $fieldName; |
60 | 60 | } |