@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * The object's hierarchy can be rebuilt with {@see self::hierarchy()}. |
55 | 55 | * |
56 | - * @return HierarchicalInterface Chainable |
|
56 | + * @return HierarchicalTrait Chainable |
|
57 | 57 | */ |
58 | 58 | public function resetHierarchy() |
59 | 59 | { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * |
68 | 68 | * @param mixed $master The object's parent (or master). |
69 | 69 | * @throws UnexpectedValueException The current object cannot be its own parent. |
70 | - * @return HierarchicalInterface Chainable |
|
70 | + * @return HierarchicalTrait Chainable |
|
71 | 71 | */ |
72 | 72 | public function setMaster($master) |
73 | 73 | { |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | |
266 | 266 | /** |
267 | 267 | * @param array $children The children to set. |
268 | - * @return HierarchicalInterface Chainable |
|
268 | + * @return HierarchicalTrait Chainable |
|
269 | 269 | */ |
270 | 270 | public function setChildren(array $children) |
271 | 271 | { |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | /** |
280 | 280 | * @param mixed $child The child object (or ident) to add. |
281 | 281 | * @throws UnexpectedValueException The current object cannot be its own child. |
282 | - * @return HierarchicalInterface Chainable |
|
282 | + * @return HierarchicalTrait Chainable |
|
283 | 283 | */ |
284 | 284 | public function addChild($child) |
285 | 285 | { |
@@ -332,7 +332,7 @@ discard block |
||
332 | 332 | |
333 | 333 | /** |
334 | 334 | * @param mixed $master The master object (or ident) to check against. |
335 | - * @return boolean |
|
335 | + * @return false|null |
|
336 | 336 | */ |
337 | 337 | public function recursiveIsChildOf($master) |
338 | 338 | { |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | * Add an object to the cache store. |
468 | 468 | * |
469 | 469 | * @param ModelInterface $obj The object to store. |
470 | - * @return HierarchicalInterface Chainable |
|
470 | + * @return HierarchicalTrait Chainable |
|
471 | 471 | */ |
472 | 472 | private function addObjectToCache(ModelInterface $obj) |
473 | 473 | { |
@@ -179,7 +179,7 @@ |
||
179 | 179 | } |
180 | 180 | |
181 | 181 | /** |
182 | - * @param mixed $revTs The revision's timestamp. |
|
182 | + * @param string $revTs The revision's timestamp. |
|
183 | 183 | * @throws InvalidArgumentException If the timestamp is invalid. |
184 | 184 | * @return ObjectRevision Chainable |
185 | 185 | */ |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | /** |
35 | 35 | * @param boolean $enabled The (revision) enabled flag. |
36 | - * @return RevisionableInterface Chainable |
|
36 | + * @return RevisionableTrait Chainable |
|
37 | 37 | */ |
38 | 38 | public function setRevisionEnabled($enabled) |
39 | 39 | { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @param string $className The class name of the object revision model. |
68 | 68 | * @throws InvalidArgumentException If the class name is not a string. |
69 | - * @return AbstractPropertyDisplay Chainable |
|
69 | + * @return RevisionableTrait Chainable |
|
70 | 70 | */ |
71 | 71 | protected function setObjectRevisionClass($className) |
72 | 72 | { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * Set the object's URL slug pattern. |
88 | 88 | * |
89 | 89 | * @param mixed $pattern The slug pattern. |
90 | - * @return RoutableInterface Chainable |
|
90 | + * @return RoutableTrait Chainable |
|
91 | 91 | */ |
92 | 92 | public function setSlugPattern($pattern) |
93 | 93 | { |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * Set the object's URL slug. |
194 | 194 | * |
195 | 195 | * @param mixed $slug The slug. |
196 | - * @return RoutableInterface Chainable |
|
196 | + * @return RoutableTrait Chainable |
|
197 | 197 | */ |
198 | 198 | public function setSlug($slug) |
199 | 199 | { |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | * |
678 | 678 | * @param string $className The class name of the object route model. |
679 | 679 | * @throws InvalidArgumentException If the class name is not a string. |
680 | - * @return AbstractPropertyDisplay Chainable |
|
680 | + * @return RoutableTrait Chainable |
|
681 | 681 | */ |
682 | 682 | protected function setObjectRouteClass($className) |
683 | 683 | { |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | if ($this instanceof ViewableInterface && $this->view() !== null) { |
284 | 284 | $route = $this->view()->render($pattern, $this->viewController()); |
285 | 285 | } else { |
286 | - $route = preg_replace_callback('~\{\{\s*(.*?)\s*\}\}~i', [ $this, 'parseRouteToken' ], $pattern); |
|
286 | + $route = preg_replace_callback('~\{\{\s*(.*?)\s*\}\}~i', [$this, 'parseRouteToken'], $pattern); |
|
287 | 287 | } |
288 | 288 | |
289 | 289 | return $this->slugify($route); |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | } |
307 | 307 | |
308 | 308 | $token = trim($token); |
309 | - $method = [ $this, $token ]; |
|
309 | + $method = [$this, $token]; |
|
310 | 310 | |
311 | 311 | if (is_callable($method)) { |
312 | 312 | $value = call_user_func($method); |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | 'route_options' => $newData['route_options'], |
424 | 424 | 'route_options_ident' => $newData['route_options_ident'], |
425 | 425 | ]); |
426 | - $oldRoute->update([ 'route_template', 'route_options' ]); |
|
426 | + $oldRoute->update(['route_template', 'route_options']); |
|
427 | 427 | |
428 | 428 | continue; |
429 | 429 | } |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | /** |
288 | 288 | * Set the route's last creation date. |
289 | 289 | * |
290 | - * @param string|DateTimeInterface|null $time The date/time value. |
|
290 | + * @param string $time The date/time value. |
|
291 | 291 | * @throws InvalidArgumentException If the date/time value is invalid. |
292 | 292 | * @return self |
293 | 293 | */ |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | /** |
324 | 324 | * Set the route's last modification date. |
325 | 325 | * |
326 | - * @param string|DateTimeInterface|null $time The date/time value. |
|
326 | + * @param string $time The date/time value. |
|
327 | 327 | * @throws InvalidArgumentException If the date/time value is invalid. |
328 | 328 | * @return self |
329 | 329 | */ |
@@ -259,7 +259,7 @@ |
||
259 | 259 | /** |
260 | 260 | * Set the date/time the item was processed at. |
261 | 261 | * |
262 | - * @param null|string|DateTimeInterface $ts A date/time string or object. |
|
262 | + * @param string $ts A date/time string or object. |
|
263 | 263 | * @throws InvalidArgumentException If the date/time is invalid. |
264 | 264 | * @return ObjectScheduleInterface Chainable |
265 | 265 | */ |
@@ -195,7 +195,7 @@ |
||
195 | 195 | /** |
196 | 196 | * Set when the object was created. |
197 | 197 | * |
198 | - * @param DateTimeInterface|string|null $timestamp The timestamp at object's creation. |
|
198 | + * @param string $timestamp The timestamp at object's creation. |
|
199 | 199 | * NULL is accepted and instances of DateTimeInterface are recommended; |
200 | 200 | * any other value will be converted (if possible) into one. |
201 | 201 | * @throws InvalidArgumentException If the timestamp is invalid. |
@@ -197,7 +197,7 @@ |
||
197 | 197 | $now = new DateTime(); |
198 | 198 | $publish = $this->getPublishDate(); |
199 | 199 | $expiry = $this->getExpiryDate(); |
200 | - $status = $this->getPublishStatus() ; |
|
200 | + $status = $this->getPublishStatus(); |
|
201 | 201 | |
202 | 202 | if ($status !== static::STATUS_PUBLISHED) { |
203 | 203 | return $status; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | // Repair bad hierarchy. |
74 | 74 | if ($object->hasMaster() && $object->getMaster()->id() === $object->id()) { |
75 | 75 | $object->setMaster(0); |
76 | - $object->update([ 'master' ]); |
|
76 | + $object->update(['master']); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | if ($object->hasMaster()) { |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | } |
114 | 114 | } else { |
115 | - $start = (( $pageNum - 1 ) * $perPage); |
|
115 | + $start = (($pageNum - 1) * $perPage); |
|
116 | 116 | $end = ($start + $perPage); |
117 | 117 | |
118 | 118 | foreach ($this->objects as $object) { |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | } |
227 | 227 | } else { |
228 | - $start = (( $pageNum - 1 ) * $perPage); |
|
228 | + $start = (($pageNum - 1) * $perPage); |
|
229 | 229 | $end = ($start + $perPage); |
230 | 230 | |
231 | 231 | foreach ($childObjects[$parentObj->id()] as $object) { |