@@ -71,7 +71,7 @@ |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | //Sort alphabetically de menu items |
74 | - usort($menuItems, function ($itemA, $itemB) { |
|
74 | + usort($menuItems, function($itemA, $itemB) { |
|
75 | 75 | return strcmp($itemA['name'], $itemB['name']); |
76 | 76 | }); |
77 | 77 |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | $fieldName = $field->getName(); |
442 | 442 | $requestValue = $request->input("main.{$fieldName}"); |
443 | 443 | |
444 | - if (! empty($foreignFields) && (! empty($foreignFields[$fieldName])) && (empty($requestValue))) { |
|
444 | + if (!empty($foreignFields) && (!empty($foreignFields[$fieldName])) && (empty($requestValue))) { |
|
445 | 445 | $requestValue = null; |
446 | 446 | } |
447 | 447 | |
@@ -471,9 +471,9 @@ discard block |
||
471 | 471 | continue; |
472 | 472 | } |
473 | 473 | |
474 | - if (! empty($requestValue) |
|
474 | + if (!empty($requestValue) |
|
475 | 475 | || (empty($requestValue) && !empty($item->getAttribute($fieldName))) |
476 | - || (! empty($foreignFields) && (! empty($foreignFields[$fieldName])) && (empty($requestValue))) |
|
476 | + || (!empty($foreignFields) && (!empty($foreignFields[$fieldName])) && (empty($requestValue))) |
|
477 | 477 | ) { |
478 | 478 | $item->setAttribute( |
479 | 479 | $fieldName, |
@@ -96,6 +96,9 @@ discard block |
||
96 | 96 | return transcrud($this->name); |
97 | 97 | } |
98 | 98 | |
99 | + /** |
|
100 | + * @return string |
|
101 | + */ |
|
99 | 102 | public function getModel() |
100 | 103 | { |
101 | 104 | return $this->model; |
@@ -410,7 +413,7 @@ discard block |
||
410 | 413 | } |
411 | 414 | |
412 | 415 | /** |
413 | - * @param array $requestForm |
|
416 | + * @param array $request |
|
414 | 417 | * |
415 | 418 | * @return mixed |
416 | 419 | */ |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
145 | - * @return mixed |
|
145 | + * @return string |
|
146 | 146 | */ |
147 | 147 | public function getValue() |
148 | 148 | { |
@@ -180,6 +180,9 @@ discard block |
||
180 | 180 | return $this->formField; |
181 | 181 | } |
182 | 182 | |
183 | + /** |
|
184 | + * @param boolean $value |
|
185 | + */ |
|
183 | 186 | public function hideValue($value = null) |
184 | 187 | { |
185 | 188 | if (!is_null($value)) { |
@@ -189,6 +192,9 @@ discard block |
||
189 | 192 | return $this->hideValue; |
190 | 193 | } |
191 | 194 | |
195 | + /** |
|
196 | + * @param boolean $value |
|
197 | + */ |
|
192 | 198 | public function saveIfEmpty($value = null) |
193 | 199 | { |
194 | 200 | if (!is_null($value)) { |
@@ -198,6 +204,9 @@ discard block |
||
198 | 204 | return $this->saveIfEmpty; |
199 | 205 | } |
200 | 206 | |
207 | + /** |
|
208 | + * @param boolean $value |
|
209 | + */ |
|
201 | 210 | public function noValidate($value = null) |
202 | 211 | { |
203 | 212 | if (!is_null($value)) { |
@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
61 | - * @param $slug |
|
61 | + * @param string $slug |
|
62 | 62 | * @param null $id |
63 | 63 | * |
64 | 64 | * @throws \Exception |
@@ -13,7 +13,7 @@ |
||
13 | 13 | * @param Request $request |
14 | 14 | * @param Model $item |
15 | 15 | * @param array $fields |
16 | - * @param $groupName |
|
16 | + * @param string $groupName |
|
17 | 17 | * @param $fieldName |
18 | 18 | * @param bool $mustDeleteFilesInFilesystem |
19 | 19 | * |
@@ -26,7 +26,7 @@ |
||
26 | 26 | * @param array $config |
27 | 27 | * @param string $columnName |
28 | 28 | * |
29 | - * @return array |
|
29 | + * @return \Doctrine\DBAL\Schema\Column |
|
30 | 30 | */ |
31 | 31 | public function setConfig(array $config, $columnName) |
32 | 32 | { |
@@ -63,7 +63,6 @@ |
||
63 | 63 | public function getSecondaryRelations(); |
64 | 64 | |
65 | 65 | /** |
66 | - * @param Model $relatedModel |
|
67 | 66 | * |
68 | 67 | * @return Relation |
69 | 68 | */ |
@@ -5,7 +5,7 @@ |
||
5 | 5 | 'prefix' => 'crud', |
6 | 6 | 'namespace' => 'Anavel\Crud\Http\Controllers', |
7 | 7 | ], |
8 | - function () { |
|
8 | + function() { |
|
9 | 9 | Route::get('/', [ |
10 | 10 | 'as' => 'anavel-crud.home', |
11 | 11 | 'uses' => 'HomeController@index', |
@@ -46,7 +46,7 @@ |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | // If results are displayed using a field other than id, order by that field |
49 | - if (! empty($this->config['display'])) { |
|
49 | + if (!empty($this->config['display'])) { |
|
50 | 50 | asort($options); |
51 | 51 | } |
52 | 52 |