Completed
Pull Request — master (#4)
by
unknown
08:57
created
src/Charcoal/Object/HierarchicalTrait.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
src/Charcoal/Object/ObjectRevision.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
src/Charcoal/Object/RevisionableTrait.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
src/Charcoal/Object/RoutableTrait.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
         if ($this instanceof ViewableInterface && $this->view() !== null) {
291 291
             $route = $this->view()->render($pattern, $this->viewController());
292 292
         } else {
293
-            $route = preg_replace_callback('~\{\{\s*(.*?)\s*\}\}~i', [ $this, 'parseRouteToken' ], $pattern);
293
+            $route = preg_replace_callback('~\{\{\s*(.*?)\s*\}\}~i', [$this, 'parseRouteToken'], $pattern);
294 294
         }
295 295
 
296 296
         return $this->slugify($route);
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
         }
314 314
 
315 315
         $token = trim($token);
316
-        $method = [ $this, $token ];
316
+        $method = [$this, $token];
317 317
 
318 318
         if (is_callable($method)) {
319 319
             $value = call_user_func($method);
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
                     'route_options'       => $data['route_options'],
427 427
                     'route_options_ident' => $data['route_options_ident']
428 428
                 ]);
429
-                $oldRoute->update([ 'route_template', 'route_options' ]);
429
+                $oldRoute->update(['route_template', 'route_options']);
430 430
                 continue;
431 431
             }
432 432
 
Please login to merge, or discard this patch.
src/Charcoal/Object/ObjectSchedule.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
     /**
166 166
      * @param array|string $data The data diff.
167
-     * @return ObjectRevision
167
+     * @return ObjectSchedule
168 168
      */
169 169
     public function setDataDiff($data)
170 170
     {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     }
180 180
 
181 181
     /**
182
-     * @return array
182
+     * @return string
183 183
      */
184 184
     public function dataDiff()
185 185
     {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
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
      */
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
      *
309 309
      * Presets the item as _to-be_ processed and queued now.
310 310
      *
311
-     * @return ObjectScheduleInterface Chainable
311
+     * @return boolean Chainable
312 312
      */
313 313
     public function preSave()
314 314
     {
Please login to merge, or discard this patch.
src/Charcoal/Object/ObjectRoute.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
src/Charcoal/Object/HierarchicalCollection.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     /**
282 282
      * @param  integer $page The current page. Start at 0.
283 283
      * @throws InvalidArgumentException If the parameter is not numeric or < 0.
284
-     * @return Pagination (Chainable)
284
+     * @return HierarchicalCollection (Chainable)
285 285
      */
286 286
     public function setPage($page)
287 287
     {
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
     /**
315 315
      * @param  integer $num The number of results to retrieve, per page.
316 316
      * @throws InvalidArgumentException If the parameter is not numeric or < 0.
317
-     * @return Pagination (Chainable)
317
+     * @return HierarchicalCollection (Chainable)
318 318
      */
319 319
     public function setNumPerPage($num)
320 320
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             // Repair bad hierarchy.
74 74
             if ($object->hasMaster() && $object->master()->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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.