@@ -25,6 +25,9 @@ |
||
25 | 25 | $this->formGenerator = $formGenerator; |
26 | 26 | } |
27 | 27 | |
28 | + /** |
|
29 | + * @param string $methodName |
|
30 | + */ |
|
28 | 31 | private function authorizeMethod(Model $modelAbstractor, $methodName) |
29 | 32 | { |
30 | 33 | if (array_key_exists('authorize', $config = $modelAbstractor->getConfig()) && $config['authorize'] === true) { |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | public function apply($model, Repository $repository) |
19 | 19 | { |
20 | - $query = $model->where(function ($query) use ($repository) { |
|
20 | + $query = $model->where(function($query) use ($repository) { |
|
21 | 21 | $firstColumn = array_shift($this->columns); |
22 | 22 | |
23 | 23 | if (strpos($firstColumn, '.')) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | private function getRelationClosure(array $relations) |
57 | 57 | { |
58 | - return function ($query) use ($relations) { |
|
58 | + return function($query) use ($relations) { |
|
59 | 59 | $relation = array_shift($relations); |
60 | 60 | |
61 | 61 | if (count($relations) > 0) { |
@@ -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 | */ |