@@ -127,7 +127,7 @@ |
||
127 | 127 | * of a mistletoe config file. |
128 | 128 | * |
129 | 129 | * @param $path |
130 | - * @return mixed |
|
130 | + * @return TaskPlanner |
|
131 | 131 | * @throws \Exception |
132 | 132 | */ |
133 | 133 | private function loadTaskPlanner($path) |
@@ -150,6 +150,9 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function addWeekday($weekday); |
152 | 152 | |
153 | + /** |
|
154 | + * @return TaskBag |
|
155 | + */ |
|
153 | 156 | public function setEnvironments($environments); |
154 | 157 | |
155 | 158 | /** |
@@ -193,6 +196,7 @@ discard block |
||
193 | 196 | |
194 | 197 | /** |
195 | 198 | * @param ExpressionBuilderInterface $expressionBuilder |
199 | + * @return void |
|
196 | 200 | */ |
197 | 201 | public function setExpressionBuilder($expressionBuilder); |
198 | 202 | |
@@ -206,6 +210,7 @@ discard block |
||
206 | 210 | * @param string $currentTime |
207 | 211 | * @param int $nth |
208 | 212 | * @param bool $allowCurrentDate |
213 | + * @return void |
|
209 | 214 | */ |
210 | 215 | public function getNextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false); |
211 | 216 | |
@@ -213,6 +218,7 @@ discard block |
||
213 | 218 | * @param string $currentTime |
214 | 219 | * @param int $nth |
215 | 220 | * @param bool $allowCurrentDate |
221 | + * @return void |
|
216 | 222 | */ |
217 | 223 | public function getPreviousRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate = false); |
218 | 224 | } |
219 | 225 | \ No newline at end of file |
@@ -145,6 +145,12 @@ discard block |
||
145 | 145 | * 'hasInterval' TRUE if a range is specified. FALSE otherwise |
146 | 146 | * 'interval' The interval if a range is specified. |
147 | 147 | */ |
148 | + |
|
149 | + /** |
|
150 | + * @param integer $rangeMin |
|
151 | + * @param integer $rangeMax |
|
152 | + * @param string $errorName |
|
153 | + */ |
|
148 | 154 | final private function cronInterpret($specification, $rangeMin, $rangeMax, $namedItems, $errorName) |
149 | 155 | { |
150 | 156 | |
@@ -476,6 +482,9 @@ discard block |
||
476 | 482 | // Result: FALSE if current did not overflow (reset back to the earliest possible value). TRUE if it did. |
477 | 483 | // |
478 | 484 | |
485 | + /** |
|
486 | + * @param integer $rangeMin |
|
487 | + */ |
|
479 | 488 | final private function advanceItem($arrItems, $rangeMin, $rangeMax, & $current) |
480 | 489 | { |
481 | 490 | |
@@ -654,6 +663,9 @@ discard block |
||
654 | 663 | // Result: FALSE if current did not overflow (reset back to the highest possible value). TRUE if it did. |
655 | 664 | // |
656 | 665 | |
666 | + /** |
|
667 | + * @param integer $rangeMin |
|
668 | + */ |
|
657 | 669 | final private function recedeItem($arrItems, $rangeMin, $rangeMax, & $current) |
658 | 670 | { |
659 | 671 | |
@@ -1027,6 +1039,11 @@ discard block |
||
1027 | 1039 | return (strlen($number) == 1 ? '0' : '').$number; |
1028 | 1040 | } |
1029 | 1041 | |
1042 | + /** |
|
1043 | + * @param string $id |
|
1044 | + * |
|
1045 | + * @return boolean|string |
|
1046 | + */ |
|
1030 | 1047 | final private function natlangApply($id, $p1 = FALSE, $p2 = FALSE, $p3 = FALSE, $p4 = FALSE, $p5 = FALSE, $p6 = FALSE) |
1031 | 1048 | { |
1032 | 1049 | $txt = $this->_lang[$id]; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | /** |
58 | 58 | * Builds expression from a string expression |
59 | - * @param $string |
|
59 | + * @param null|string $string |
|
60 | 60 | * @return CronExpression |
61 | 61 | */ |
62 | 62 | public function buildFrom($string) |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | /** |
115 | 115 | * Returns the part from the bag with * as default |
116 | - * @param $part |
|
116 | + * @param string $part |
|
117 | 117 | * @return string |
118 | 118 | */ |
119 | 119 | protected function getPartWithDefault($part) |
@@ -39,7 +39,7 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
42 | - * @return mixed |
|
42 | + * @return string |
|
43 | 43 | */ |
44 | 44 | public function getCurrentTime() |
45 | 45 | { |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | /** |
50 | 50 | * TaskBag constructor. |
51 | - * @param null $task |
|
51 | + * @param string $task |
|
52 | 52 | */ |
53 | 53 | public function __construct($task = null) |
54 | 54 | { |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
77 | - * @param $task |
|
77 | + * @param string $task |
|
78 | 78 | * @return $this |
79 | 79 | */ |
80 | 80 | public function setTask($task) |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
95 | - * @param $interval |
|
95 | + * @param string $interval |
|
96 | 96 | * @return $this |
97 | 97 | */ |
98 | 98 | public function setInterval($interval) |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
119 | - * @param $time |
|
119 | + * @param string $time |
|
120 | 120 | * @return $this |
121 | 121 | */ |
122 | 122 | public function addTime($time) |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
159 | - * @param string|int|array $month |
|
159 | + * @param integer $month |
|
160 | 160 | * @return $this |
161 | 161 | */ |
162 | 162 | public function setMonth($month) |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | } |
185 | 185 | |
186 | 186 | /** |
187 | - * @param string|int|array $day |
|
187 | + * @param integer $day |
|
188 | 188 | * @return $this |
189 | 189 | */ |
190 | 190 | public function setDay($day) |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | } |
442 | 442 | |
443 | 443 | /** |
444 | - * @param $date |
|
444 | + * @param string $date |
|
445 | 445 | * @return array |
446 | 446 | */ |
447 | 447 | protected function parseDate($date) |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | } |
457 | 457 | |
458 | 458 | /** |
459 | - * @param $key |
|
459 | + * @param string $key |
|
460 | 460 | * @param $value |
461 | 461 | * @param string $deliminator |
462 | 462 | */ |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | /* Schedule a full expression */ |
65 | 65 | /** |
66 | 66 | * Add a full expression |
67 | - * @param $expression |
|
67 | + * @param string $expression |
|
68 | 68 | * @return $this |
69 | 69 | */ |
70 | 70 | public function schedule($expression) |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | } |
476 | 476 | |
477 | 477 | /** |
478 | - * @return $this |
|
478 | + * @return TaskRunnerInterface |
|
479 | 479 | */ |
480 | 480 | public function getTaskRunner() |
481 | 481 | { |
@@ -550,7 +550,7 @@ discard block |
||
550 | 550 | /* Internal Methods */ |
551 | 551 | /** |
552 | 552 | * @param string $task |
553 | - * @param null $body |
|
553 | + * @param \Closure|null $body |
|
554 | 554 | */ |
555 | 555 | protected function createNewTask($task, $body = null) |
556 | 556 | { |
@@ -578,6 +578,9 @@ discard block |
||
578 | 578 | return $this->currentTask; |
579 | 579 | } |
580 | 580 | |
581 | + /** |
|
582 | + * @return null|string |
|
583 | + */ |
|
581 | 584 | private function getNextClosureIncrement() |
582 | 585 | { |
583 | 586 | $this->closureIncrement++; |
@@ -585,7 +588,7 @@ discard block |
||
585 | 588 | } |
586 | 589 | |
587 | 590 | /** |
588 | - * @return mixed |
|
591 | + * @return string |
|
589 | 592 | */ |
590 | 593 | public function getCurrentTime() |
591 | 594 | { |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Mistletoe; |
3 | -use Mistletoe\Runners\GenericTaskRunner; |
|
4 | 3 | use Mistletoe\Contracts\TaskRunnerInterface; |
4 | +use Mistletoe\Runners\GenericTaskRunner; |
|
5 | 5 | |
6 | 6 | /** |
7 | 7 | * Class TaskPlanner |