@@ -59,7 +59,7 @@ |
||
59 | 59 | * @param array $images |
60 | 60 | * @param PermissionsInterface $permissions |
61 | 61 | * |
62 | - * @return mixed |
|
62 | + * @return ImageSet |
|
63 | 63 | */ |
64 | 64 | public function setImages(array $images, PermissionsInterface $permissions = null); |
65 | 65 |
@@ -20,14 +20,14 @@ discard block |
||
20 | 20 | * Sets the Postal Code of a location |
21 | 21 | * |
22 | 22 | * @param string $postalCode |
23 | - * @return mixed |
|
23 | + * @return AbstractLocation |
|
24 | 24 | */ |
25 | 25 | public function setPostalCode($postalCode); |
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Gets the Postal Code of a location |
29 | 29 | * |
30 | - * @return mixed |
|
30 | + * @return string |
|
31 | 31 | */ |
32 | 32 | public function getPostalCode(); |
33 | 33 | |
@@ -44,6 +44,7 @@ discard block |
||
44 | 44 | * |
45 | 45 | * @param GeoJson $coordinates |
46 | 46 | * @internal param $point |
47 | + * @return AbstractLocation |
|
47 | 48 | */ |
48 | 49 | public function setCoordinates(GeoJson $coordinates); |
49 | 50 | |
@@ -51,7 +52,7 @@ discard block |
||
51 | 52 | * Sets the city name of a Location |
52 | 53 | * |
53 | 54 | * @param $city |
54 | - * @return mixed |
|
55 | + * @return AbstractLocation |
|
55 | 56 | */ |
56 | 57 | public function setCity($city); |
57 | 58 | |
@@ -66,14 +67,14 @@ discard block |
||
66 | 67 | * Sets the country of a location |
67 | 68 | * |
68 | 69 | * @param $country |
69 | - * @return mixed |
|
70 | + * @return AbstractLocation |
|
70 | 71 | */ |
71 | 72 | public function setCountry($country); |
72 | 73 | |
73 | 74 | /** |
74 | 75 | * Gets the country of a location |
75 | 76 | * |
76 | - * @return mixed |
|
77 | + * @return string |
|
77 | 78 | */ |
78 | 79 | public function getCountry(); |
79 | 80 | |
@@ -81,7 +82,7 @@ discard block |
||
81 | 82 | * Sets the region of a location. Eg. "Hessen" is a region in "Germany" |
82 | 83 | * |
83 | 84 | * @param $region |
84 | - * @return mixed |
|
85 | + * @return AbstractLocation |
|
85 | 86 | */ |
86 | 87 | public function setRegion($region); |
87 | 88 | |
@@ -96,14 +97,14 @@ discard block |
||
96 | 97 | * Sets the Streetname of a location |
97 | 98 | * |
98 | 99 | * @param $street |
99 | - * @return mixed |
|
100 | + * @return AbstractLocation |
|
100 | 101 | */ |
101 | 102 | public function setStreetname($street); |
102 | 103 | |
103 | 104 | /** |
104 | 105 | * Gets the streetname of a location |
105 | 106 | * |
106 | - * @return mixed |
|
107 | + * @return string |
|
107 | 108 | */ |
108 | 109 | public function getStreetname(); |
109 | 110 | |
@@ -111,14 +112,14 @@ discard block |
||
111 | 112 | * Sets the Streetnumber of a location |
112 | 113 | * |
113 | 114 | * @param $number |
114 | - * @return mixed |
|
115 | + * @return AbstractLocation |
|
115 | 116 | */ |
116 | 117 | public function setStreetnumber($number); |
117 | 118 | |
118 | 119 | /** |
119 | 120 | * Gets the streetnumber of a location |
120 | 121 | * |
121 | - * @return mixeed |
|
122 | + * @return string |
|
122 | 123 | */ |
123 | 124 | public function getStreetnumber(); |
124 | 125 | } |
@@ -353,6 +353,9 @@ |
||
353 | 353 | return $this; |
354 | 354 | } |
355 | 355 | |
356 | + /** |
|
357 | + * @param string $permission |
|
358 | + */ |
|
356 | 359 | private function checkIsGranted($userId, $permission) |
357 | 360 | { |
358 | 361 | if (!$userId) { |
@@ -149,21 +149,21 @@ discard block |
||
149 | 149 | } |
150 | 150 | |
151 | 151 | if (preg_match('~^is(View|Change|None|All)Granted$~', $method, $match)) { |
152 | - $permission = constant('self::PERMISSION_' . strtoupper($match[1])); |
|
152 | + $permission = constant('self::PERMISSION_'.strtoupper($match[1])); |
|
153 | 153 | return $this->isGranted($params[0], $permission); |
154 | 154 | } |
155 | 155 | |
156 | 156 | if (preg_match('~^grant(View|Change|None|All)$~', $method, $match)) { |
157 | - $permission = constant('self::PERMISSION_' . strtoupper($match[1])); |
|
157 | + $permission = constant('self::PERMISSION_'.strtoupper($match[1])); |
|
158 | 158 | return $this->grant($params[0], $permission); |
159 | 159 | } |
160 | 160 | |
161 | 161 | if (preg_match('~^revoke(View|Change|None|All)$~', $method, $match)) { |
162 | - $permission = constant('self::PERMISSION_' . strtoupper($match[1])); |
|
162 | + $permission = constant('self::PERMISSION_'.strtoupper($match[1])); |
|
163 | 163 | return $this->revoke($params[0], $permission); |
164 | 164 | } |
165 | 165 | |
166 | - throw new \BadMethodCallException('Unknown method "' . $method . '"'); |
|
166 | + throw new \BadMethodCallException('Unknown method "'.$method.'"'); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | /** |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | if ($build) { |
312 | 312 | $this->build(); |
313 | 313 | } |
314 | - $this->hasChanged= true; |
|
314 | + $this->hasChanged = true; |
|
315 | 315 | |
316 | 316 | // restore orginial permissions type |
317 | 317 | $this->type = $oldType; |
@@ -444,10 +444,10 @@ discard block |
||
444 | 444 | } |
445 | 445 | |
446 | 446 | if ($resource instanceof UserInterface) { |
447 | - return 'user:' . $resource->getId(); |
|
447 | + return 'user:'.$resource->getId(); |
|
448 | 448 | } |
449 | 449 | |
450 | - return 'user:' . $resource; |
|
450 | + return 'user:'.$resource; |
|
451 | 451 | } |
452 | 452 | |
453 | 453 | /** |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | ); |
468 | 468 | if (!in_array($permission, $perms)) { |
469 | 469 | throw new \InvalidArgumentException( |
470 | - 'Invalid permission. Must be one of ' . implode(', ', $perms) |
|
470 | + 'Invalid permission. Must be one of '.implode(', ', $perms) |
|
471 | 471 | ); |
472 | 472 | } |
473 | 473 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | { |
24 | 24 | /** |
25 | 25 | * @param $data |
26 | - * @return mixed |
|
26 | + * @return Snapshot |
|
27 | 27 | * @ODM\PreUpdate |
28 | 28 | */ |
29 | 29 | public function __invoke($data) |
@@ -77,6 +77,9 @@ discard block |
||
77 | 77 | return $return === $entity ? $this : $return; |
78 | 78 | } |
79 | 79 | |
80 | + /** |
|
81 | + * @param string $method |
|
82 | + */ |
|
80 | 83 | protected function proxyClone($method, ...$args) |
81 | 84 | { |
82 | 85 | $value = $this->proxy($method, ...$args); |
@@ -85,6 +88,9 @@ discard block |
||
85 | 88 | return $return; |
86 | 89 | } |
87 | 90 | |
91 | + /** |
|
92 | + * @param string $property |
|
93 | + */ |
|
88 | 94 | protected function inaccessible($property) |
89 | 95 | { |
90 | 96 | throw new \DomainException(sprintf( |
@@ -93,6 +99,9 @@ discard block |
||
93 | 99 | )); |
94 | 100 | } |
95 | 101 | |
102 | + /** |
|
103 | + * @param string $property |
|
104 | + */ |
|
96 | 105 | protected function immutable($property) |
97 | 106 | { |
98 | 107 | throw new ImmutablePropertyException($property, $this); |
@@ -72,7 +72,7 @@ |
||
72 | 72 | if (!is_callable($callback)) { |
73 | 73 | throw new \BadMethodCallException(sprintf( |
74 | 74 | 'Proxy error: Method "%s" does not exist in proxied "%s"', |
75 | - $method, |
|
75 | + $method, |
|
76 | 76 | get_class($entity) |
77 | 77 | )); |
78 | 78 | } |
@@ -37,7 +37,7 @@ |
||
37 | 37 | : SnapshotMeta::class; |
38 | 38 | |
39 | 39 | $this->snapshotMeta = new $snapshotMetaClass(); |
40 | - $this->snapshotEntity = $source; |
|
40 | + $this->snapshotEntity = $source; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | public function getOriginalEntity() |
@@ -69,6 +69,9 @@ |
||
69 | 69 | */ |
70 | 70 | protected $parent; |
71 | 71 | |
72 | + /** |
|
73 | + * @param string $value |
|
74 | + */ |
|
72 | 75 | final public static function filterValue($value) |
73 | 76 | { |
74 | 77 | $value = mb_strtolower($value); |
@@ -153,7 +153,7 @@ |
||
153 | 153 | |
154 | 154 | public function getValueWithParents($withRoot = false, $useNames = false) |
155 | 155 | { |
156 | - $parts = [ ($useNames ? $this->getName() : $this->getValue()) ]; |
|
156 | + $parts = [($useNames ? $this->getName() : $this->getValue())]; |
|
157 | 157 | $item = $this; |
158 | 158 | |
159 | 159 | while ($item = $item->getParent()) { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | * @param string $requestedName |
114 | 114 | * @param null|array $options |
115 | 115 | * |
116 | - * @return object |
|
116 | + * @return \Zend\EventManager\EventManagerInterface |
|
117 | 117 | * @throws ServiceNotFoundException if unable to resolve the service. |
118 | 118 | * @throws ServiceNotCreatedException if an exception is raised when |
119 | 119 | * creating a service. |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | * @param string|array $options String is either event name or aggregate name (when name is int). |
334 | 334 | * Array are the options from config. [ [event,..], method, priority, lazy] |
335 | 335 | * |
336 | - * @return array |
|
336 | + * @return \Zend\EventManager\EventManagerInterface |
|
337 | 337 | */ |
338 | 338 | protected function normalizeListenerOptions($name, $options) |
339 | 339 | { |
@@ -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 |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $defaults = [ |
183 | 183 | 'service' => 'EventManager', |
184 | 184 | 'configure' => true, |
185 | - 'identifiers' => [ $name ], |
|
185 | + 'identifiers' => [$name], |
|
186 | 186 | 'event' => '\Zend\EventManager\Event', |
187 | 187 | 'listeners' => [], |
188 | 188 | ]; |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | } |
298 | 298 | |
299 | 299 | foreach ($options['attach'] as $spec) { |
300 | - $callback = $spec['method'] ? [ $listener, $spec['method'] ] : $listener; |
|
300 | + $callback = $spec['method'] ? [$listener, $spec['method']] : $listener; |
|
301 | 301 | $eventManager->attach($spec['event'], $callback, $spec['priority']); |
302 | 302 | } |
303 | 303 | } |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | |
367 | 367 | if (is_string($options)) { |
368 | 368 | /* Only an event name is provided in config */ |
369 | - $normalized['attach'] = [ [ 'event' => $options, 'method' => null, 'priority' => 1 ] ]; |
|
369 | + $normalized['attach'] = [['event' => $options, 'method' => null, 'priority' => 1]]; |
|
370 | 370 | return $normalized; |
371 | 371 | } |
372 | 372 | |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | } elseif (is_string($opt)) { |
392 | 392 | if (null === $event) { |
393 | 393 | /* first string found is assumed to be the event name */ |
394 | - $event = [ $opt ]; |
|
394 | + $event = [$opt]; |
|
395 | 395 | } else { |
396 | 396 | /* second string found must be a method name. */ |
397 | 397 | $method = $opt; |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | } |
407 | 407 | |
408 | 408 | foreach ($event as &$eventSpec) { |
409 | - $eventSpec = [ 'event' => $eventSpec, 'method' => $method, 'priority' => $priority ]; |
|
409 | + $eventSpec = ['event' => $eventSpec, 'method' => $method, 'priority' => $priority]; |
|
410 | 410 | } |
411 | 411 | |
412 | 412 | $normalized['attach'] = $event; |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | protected function normalizeEventsSpec($options) |
419 | 419 | { |
420 | 420 | $listenerPriority = isset($options['priority']) ? $options['priority'] : 1; |
421 | - $listenerMethod = isset($options['method']) ? $options['method'] : '__none__'; |
|
421 | + $listenerMethod = isset($options['method']) ? $options['method'] : '__none__'; |
|
422 | 422 | $events = []; |
423 | 423 | |
424 | 424 | foreach ($options['events'] as $event => $spec) { |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | } elseif (is_array($spec)) { |
434 | 434 | if (isset($spec['method'])) { |
435 | 435 | if (!is_array($spec['method'])) { |
436 | - $spec['method'] = [ $spec['method'] ]; |
|
436 | + $spec['method'] = [$spec['method']]; |
|
437 | 437 | } |
438 | 438 | |
439 | 439 | foreach ($spec['method'] as $method => $methodPriority) { |
@@ -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 |