| Conditions | 9 |
| Paths | 256 |
| Total Lines | 29 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function configureFrom(CronAnnotation $annotation): Job |
||
| 19 | { |
||
| 20 | if ($annotation->minute !== null) { |
||
| 21 | $this->line->setMinute($annotation->minute); |
||
| 22 | } |
||
| 23 | if ($annotation->hour !== null) { |
||
| 24 | $this->line->setHour($annotation->hour); |
||
| 25 | } |
||
| 26 | if ($annotation->dayOfMonth !== null) { |
||
| 27 | $this->line->setDayOfMonth($annotation->dayOfMonth); |
||
| 28 | } |
||
| 29 | if ($annotation->month !== null) { |
||
| 30 | $this->line->setMonth($annotation->month); |
||
| 31 | } |
||
| 32 | if ($annotation->dayOfWeek !== null) { |
||
| 33 | $this->line->setDayOfWeek($annotation->dayOfWeek); |
||
| 34 | } |
||
| 35 | if ($annotation->logFile !== null) { |
||
| 36 | $this->line->setStandardOutFile($annotation->logFile); |
||
| 37 | } |
||
| 38 | if ($annotation->errorFile !== null) { |
||
| 39 | $this->line->setStandardErrorFile($annotation->errorFile); |
||
| 40 | } |
||
| 41 | if ($annotation->noLogs !== null) { |
||
| 42 | $this->line->suppressOutput(); |
||
| 43 | } |
||
| 44 | |||
| 45 | return $this->line; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |