@@ -176,7 +176,7 @@ |
||
176 | 176 | * |
177 | 177 | * @param string $fullName |
178 | 178 | * |
179 | - * @return array|bool |
|
179 | + * @return string |
|
180 | 180 | */ |
181 | 181 | protected function getOptionsConfig($fullName) |
182 | 182 | { |
@@ -58,7 +58,7 @@ |
||
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
61 | - * @return mixed |
|
61 | + * @return null|string |
|
62 | 62 | */ |
63 | 63 | abstract protected function getUri(); |
64 | 64 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
41 | - * @return mixed |
|
41 | + * @return \Auth\Entity\UserInterface |
|
42 | 42 | */ |
43 | 43 | public function getUser() |
44 | 44 | { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | - * @param mixed $repositories |
|
71 | + * @param mixed $repository |
|
72 | 72 | * |
73 | 73 | * @return self |
74 | 74 | */ |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | public function getFileEntity() |
94 | 94 | { |
95 | - if (! $this->fileEntity instanceof FileInterface) { |
|
95 | + if (!$this->fileEntity instanceof FileInterface) { |
|
96 | 96 | throw new \RuntimeException('No file entity set or it does not implement \Core\Entity\FileInterface.'); |
97 | 97 | } |
98 | 98 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 102 | public function filter($value) |
103 | 103 | { |
104 | - if (! is_array($value) || ! isset($value['tmp_name']) || ((isset($value['error']) && UPLOAD_ERR_NO_FILE == $value['error']))) { |
|
104 | + if (!is_array($value) || !isset($value['tmp_name']) || ((isset($value['error']) && UPLOAD_ERR_NO_FILE == $value['error']))) { |
|
105 | 105 | return null; |
106 | 106 | } |
107 | 107 |
@@ -179,7 +179,7 @@ |
||
179 | 179 | |
180 | 180 | /** |
181 | 181 | * @throws \RuntimeException |
182 | - * @return Collection |
|
182 | + * @return \Core\Entity\EntityInterface |
|
183 | 183 | */ |
184 | 184 | protected function getCollection() |
185 | 185 | { |
@@ -80,12 +80,12 @@ |
||
80 | 80 | $collection[] = $this->newEntry; |
81 | 81 | $form = $this->buildForm($key, $this->newEntry); |
82 | 82 | $eventManager = $form->getEventManager(); |
83 | - $eventManager->attach(CoreForm::EVENT_IS_VALID, function (Event $event) use ($collection) { |
|
83 | + $eventManager->attach(CoreForm::EVENT_IS_VALID, function(Event $event) use ($collection) { |
|
84 | 84 | if (!$event->getParam('isValid')) { |
85 | 85 | $collection->removeElement($this->newEntry); |
86 | 86 | } |
87 | 87 | }); |
88 | - $eventManager->attach(CoreForm::EVENT_PREPARE, function (Event $event) use ($collection) { |
|
88 | + $eventManager->attach(CoreForm::EVENT_PREPARE, function(Event $event) use ($collection) { |
|
89 | 89 | $this->setupForm($event->getTarget(), $collection->indexOf($this->newEntry)); |
90 | 90 | }); |
91 | 91 |
@@ -77,6 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | /** |
79 | 79 | * @param string $description |
80 | + * @param double[] $params |
|
80 | 81 | * |
81 | 82 | * @return $this |
82 | 83 | */ |
@@ -258,7 +259,7 @@ discard block |
||
258 | 259 | } |
259 | 260 | |
260 | 261 | /** |
261 | - * @param $spec |
|
262 | + * @param string $spec |
|
262 | 263 | * |
263 | 264 | * @return $this |
264 | 265 | */ |
@@ -25,8 +25,8 @@ |
||
25 | 25 | */ |
26 | 26 | class Form extends ZendForm implements |
27 | 27 | DescriptionAwareFormInterface, |
28 | - DisableElementsCapableInterface, |
|
29 | - FormParentInterface |
|
28 | + DisableElementsCapableInterface, |
|
29 | + FormParentInterface |
|
30 | 30 | { |
31 | 31 | use EventManagerAwareTrait, HydratorStrategyAwareTrait; |
32 | 32 |
@@ -368,9 +368,9 @@ |
||
368 | 368 | if (!$inputExists && $required) { |
369 | 369 | $fieldsetName = ''; |
370 | 370 | if ($fieldset->hasAttribute('name')) { |
371 | - $fieldsetName = 'in Fieldset "' . $fieldset->getAttribute('name') . '" '; |
|
371 | + $fieldsetName = 'in Fieldset "'.$fieldset->getAttribute('name').'" '; |
|
372 | 372 | } |
373 | - throw new \RuntimeException('input for "' . $name . '" ' . $fieldsetName . 'is required but a input-field with this name is not defined'); |
|
373 | + throw new \RuntimeException('input for "'.$name.'" '.$fieldsetName.'is required but a input-field with this name is not defined'); |
|
374 | 374 | } |
375 | 375 | } |
376 | 376 | } |
@@ -97,7 +97,7 @@ |
||
97 | 97 | /** |
98 | 98 | * Set the allow multiple selections flag. |
99 | 99 | * |
100 | - * @param Callable|bool $flagOrCallback When a Callable is passed, it must return bool. |
|
100 | + * @param \Closure $flagOrCallback When a Callable is passed, it must return bool. |
|
101 | 101 | * |
102 | 102 | * @return self |
103 | 103 | */ |
@@ -222,7 +222,7 @@ |
||
222 | 222 | */ |
223 | 223 | private function findLeaf(NodeInterface $leaf, $value) |
224 | 224 | { |
225 | - $parts = is_array($value) ? $value : explode($this->shouldUseNames() ? ' | ': '-', $value); |
|
225 | + $parts = is_array($value) ? $value : explode($this->shouldUseNames() ? ' | ' : '-', $value); |
|
226 | 226 | $value = array_shift($parts); |
227 | 227 | |
228 | 228 | /* @var NodeInterface $item */ |
@@ -93,7 +93,7 @@ |
||
93 | 93 | * @param array $data Form values |
94 | 94 | * @param Collection $object |
95 | 95 | * |
96 | - * @return object |
|
96 | + * @return NodeInterface |
|
97 | 97 | */ |
98 | 98 | public function hydrate(array $data, $object) |
99 | 99 | { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $data = []; |
54 | 54 | $this->flattenTree($object, $data); |
55 | 55 | |
56 | - return ['items' => $data ]; |
|
56 | + return ['items' => $data]; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | if ($tree->hasChildren()) { |
79 | 79 | foreach ($tree->getChildren() as $i => $child) { |
80 | - $this->flattenTree($child, $data, $curId . '-' . ($i + 1)); |
|
80 | + $this->flattenTree($child, $data, $curId.'-'.($i + 1)); |
|
81 | 81 | } |
82 | 82 | } |
83 | 83 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | * unflatten tree |
115 | 115 | */ |
116 | 116 | $items = $data['items']; |
117 | - $tree = [ '__root__' => array_shift($items) ]; |
|
117 | + $tree = ['__root__' => array_shift($items)]; |
|
118 | 118 | |
119 | 119 | foreach ($items as $item) { |
120 | 120 | $parent = substr($item['current'], 0, strrpos($item['current'], '-')); |
@@ -73,7 +73,7 @@ |
||
73 | 73 | * |
74 | 74 | * Proxies to {@link render()}. |
75 | 75 | * |
76 | - * @param null|ElementInterface $element |
|
76 | + * @param null|ElementInterface $elements |
|
77 | 77 | * @param null|string $labelPosition |
78 | 78 | * @param bool $renderErrors |
79 | 79 | * @return string|FormRow |
@@ -62,7 +62,7 @@ |
||
62 | 62 | |
63 | 63 | |
64 | 64 | return sprintf( |
65 | - '<div class="controls controls-row ' . $form_row_class . '">%s%s</div>', |
|
65 | + '<div class="controls controls-row '.$form_row_class.'">%s%s</div>', |
|
66 | 66 | $labelMarkup, |
67 | 67 | $markups |
68 | 68 | ); |
@@ -102,7 +102,7 @@ |
||
102 | 102 | * </pre> |
103 | 103 | * |
104 | 104 | * @param string $subject |
105 | - * @param bool|mixed $translate |
|
105 | + * @param string $translate |
|
106 | 106 | * |
107 | 107 | * @since 0.19 |
108 | 108 | * @since 0.29 Add sprintf support for translation |