@@ -238,7 +238,7 @@ |
||
238 | 238 | /** |
239 | 239 | * Gets all comments for the application. |
240 | 240 | * |
241 | - * @return ArrayCollection; |
|
241 | + * @return Collection |
|
242 | 242 | |
243 | 243 | */ |
244 | 244 | public function getComments(); |
@@ -15,7 +15,6 @@ |
||
15 | 15 | |
16 | 16 | /** |
17 | 17 | * |
18 | - |
|
19 | 18 | */ |
20 | 19 | interface FileInterface extends |
21 | 20 | IdentifiableEntityInterface, |
@@ -34,7 +34,7 @@ |
||
34 | 34 | public function init() |
35 | 35 | { |
36 | 36 | $this->setHydrator(new \Core\Entity\Hydrator\EntityHydrator()) |
37 | - ->setName('base'); |
|
37 | + ->setName('base'); |
|
38 | 38 | |
39 | 39 | $this->add( |
40 | 40 | array( |
@@ -39,7 +39,7 @@ |
||
39 | 39 | || array_key_exists('user', $config['acl']['roles']) |
40 | 40 | ? array(User::ROLE_USER) |
41 | 41 | : array('none') |
42 | - ); |
|
42 | + ); |
|
43 | 43 | |
44 | 44 | $valueOptions = array(); |
45 | 45 | foreach ($publicRoles as $role) { |
@@ -22,6 +22,9 @@ |
||
22 | 22 | */ |
23 | 23 | trait EntityTrait |
24 | 24 | { |
25 | + /** |
|
26 | + * @param string $property |
|
27 | + */ |
|
25 | 28 | public function notEmpty($property, array $args=[]) |
26 | 29 | { |
27 | 30 | $method = "get$property"; |
@@ -20,16 +20,16 @@ |
||
20 | 20 | */ |
21 | 21 | trait EntityTrait |
22 | 22 | { |
23 | - public function notEmpty($property, array $args=[]) |
|
23 | + public function notEmpty($property, array $args = []) |
|
24 | 24 | { |
25 | 25 | $method = "get$property"; |
26 | 26 | |
27 | 27 | if (!method_exists($this, $method)) { |
28 | - throw new OutOfBoundsException("'$property' is not a valid property of '" . get_class($this) . "'"); |
|
28 | + throw new OutOfBoundsException("'$property' is not a valid property of '".get_class($this)."'"); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | $value = count($args) |
32 | - ? call_user_func_array([ $this, $method ], $args) |
|
32 | + ? call_user_func_array([$this, $method], $args) |
|
33 | 33 | : $this->$method(); |
34 | 34 | |
35 | 35 | if (null === $value) { // is_scalar does not consider 'null' to be scalar value. |
@@ -73,6 +73,9 @@ |
||
73 | 73 | |
74 | 74 | } |
75 | 75 | |
76 | + /** |
|
77 | + * @param string $layout |
|
78 | + */ |
|
76 | 79 | public function renderElement($element, $layout, $parameter) |
77 | 80 | { |
78 | 81 | $parameterPartial = $parameter; |
@@ -96,9 +96,9 @@ |
||
96 | 96 | } elseif ($element instanceof SummaryForm) { |
97 | 97 | $content .= $this->getView()->summaryForm($element); |
98 | 98 | } elseif ($element instanceof Container) { |
99 | - $content.= $this->render($element, $layout, $parameter); |
|
99 | + $content .= $this->render($element, $layout, $parameter); |
|
100 | 100 | } else { |
101 | - $content.= $this->getView()->form($element, $layout, $parameter); |
|
101 | + $content .= $this->getView()->form($element, $layout, $parameter); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | return $content; |
@@ -83,8 +83,8 @@ |
||
83 | 83 | if ($element instanceof ViewPartialProviderInterface) { |
84 | 84 | $parameterPartial = array_merge(array('element' => $element, 'layout' => $layout), $parameterPartial); |
85 | 85 | $content .= $this->getView()->partial( |
86 | - $element->getViewPartial(), |
|
87 | - $parameterPartial |
|
86 | + $element->getViewPartial(), |
|
87 | + $parameterPartial |
|
88 | 88 | ); |
89 | 89 | |
90 | 90 | } elseif ($element instanceof ViewHelperProviderInterface) { |
@@ -79,7 +79,6 @@ |
||
79 | 79 | /** |
80 | 80 | * Sets the invoice address. |
81 | 81 | * |
82 | - * @param InvoiceAddressInterface $invoice |
|
83 | 82 | * |
84 | 83 | * @return self |
85 | 84 | */ |
@@ -36,7 +36,7 @@ |
||
36 | 36 | * |
37 | 37 | * @param ServiceLocatorInterface $serviceLocator |
38 | 38 | * |
39 | - * @return mixed |
|
39 | + * @return InvoiceAddress |
|
40 | 40 | */ |
41 | 41 | public function createService(ServiceLocatorInterface $serviceLocator) |
42 | 42 | { |
@@ -54,8 +54,7 @@ |
||
54 | 54 | if (method_exists($events, 'setEventPrototype')) { |
55 | 55 | $event = $serviceLocator->has($config['event']) ? $serviceLocator->get($config['event']) : new $config['event'](); |
56 | 56 | $events->setEventPrototype($event); |
57 | - } |
|
58 | - else { |
|
57 | + } else { |
|
59 | 58 | $events->setEventClass($config['event']); |
60 | 59 | } |
61 | 60 |
@@ -293,7 +293,7 @@ |
||
293 | 293 | * @param string|array $options String is either event name or aggregate name (when name is int). |
294 | 294 | * Array are the options from config. [ [event,..], method, priority, lazy] |
295 | 295 | * |
296 | - * @return array |
|
296 | + * @return \Zend\EventManager\EventManagerInterface |
|
297 | 297 | */ |
298 | 298 | protected function normalizeListenerOptions($name, $options) |
299 | 299 | { |
@@ -278,7 +278,7 @@ |
||
278 | 278 | /* @var \Core\Listener\DeferredListenerAggregate $aggregate */ |
279 | 279 | $aggregate = $services->get('Core/Listener/DeferredListenerAggregate'); |
280 | 280 | $aggregate->setListeners($lazyListeners) |
281 | - ->attach($eventManager); |
|
281 | + ->attach($eventManager); |
|
282 | 282 | } |
283 | 283 | } |
284 | 284 |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $defaults = [ |
149 | 149 | 'service' => 'EventManager', |
150 | 150 | 'configure' => true, |
151 | - 'identifiers' => [ $name ], |
|
151 | + 'identifiers' => [$name], |
|
152 | 152 | 'event' => '\Zend\EventManager\Event', |
153 | 153 | 'listeners' => [], |
154 | 154 | ]; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | foreach ($listeners as $name => $options) { |
240 | 240 | $options = $this->normalizeListenerOptions($name, $options); |
241 | 241 | |
242 | - if ($options['lazy'] && null !== $options['attach'] ) { |
|
242 | + if ($options['lazy'] && null !== $options['attach']) { |
|
243 | 243 | foreach ($options['attach'] as $spec) { |
244 | 244 | $lazyListeners[] = [ |
245 | 245 | 'service' => $options['service'], |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | } |
270 | 270 | |
271 | 271 | foreach ($options['attach'] as $spec) { |
272 | - $callback = $spec['method'] ? [ $listener, $spec['method'] ] : $listener; |
|
272 | + $callback = $spec['method'] ? [$listener, $spec['method']] : $listener; |
|
273 | 273 | $eventManager->attach($spec['events'], $callback, $spec['priority']); |
274 | 274 | } |
275 | 275 | } |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | |
341 | 341 | if (is_string($options)) { |
342 | 342 | /* Only an event name is provided in config */ |
343 | - $normalized['attach'] = [ [ 'events' => [ $options ], 'method' => null, 'priority' => 0 ] ]; |
|
343 | + $normalized['attach'] = [['events' => [$options], 'method' => null, 'priority' => 0]]; |
|
344 | 344 | return $normalized; |
345 | 345 | |
346 | 346 | } |
@@ -369,7 +369,7 @@ discard block |
||
369 | 369 | } else if (is_string($opt)) { |
370 | 370 | if (null === $event) { |
371 | 371 | /* first string found is assumed to be the event name */ |
372 | - $event = [ $opt ]; |
|
372 | + $event = [$opt]; |
|
373 | 373 | } else { |
374 | 374 | /* second string found must be a method name. */ |
375 | 375 | $method = $opt; |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | } |
386 | 386 | } |
387 | 387 | |
388 | - $normalized['attach'] = [ [ 'events' => $event, 'method' => $method, 'priority' => $priority ] ]; |
|
388 | + $normalized['attach'] = [['events' => $event, 'method' => $method, 'priority' => $priority]]; |
|
389 | 389 | $normalized['lazy'] = $lazy; |
390 | 390 | |
391 | 391 | return $normalized; |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | protected function normalizeEventsSpec($options) |
395 | 395 | { |
396 | 396 | $listenerPriority = isset($options['priority']) ? $options['priority'] : 0; |
397 | - $listenerMethod = isset($options['method']) ? $options['method'] : '__none__'; |
|
397 | + $listenerMethod = isset($options['method']) ? $options['method'] : '__none__'; |
|
398 | 398 | $events = []; |
399 | 399 | |
400 | 400 | foreach ($options['events'] as $event => $spec) { |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | } else if (is_array($spec)) { |
415 | 415 | if (isset($spec['method'])) { |
416 | 416 | if (!is_array($spec['method'])) { |
417 | - $spec['method'] = [ $spec['method'] ]; |
|
417 | + $spec['method'] = [$spec['method']]; |
|
418 | 418 | } |
419 | 419 | |
420 | 420 | foreach ($spec['method'] as $method => $methodPriority) { |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @license MIT |
7 | 7 | * @copyright 2013 - 2016 Cross Solution <http://cross-solution.de> |
8 | 8 | */ |
9 | -return [ 'router' => [ 'routes' => [ 'lang' => [ 'child_routes' => [ |
|
9 | +return ['router' => ['routes' => ['lang' => ['child_routes' => [ |
|
10 | 10 | |
11 | 11 | 'orders' => [ |
12 | 12 | 'type' => 'Segment', |