| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function createCronJob(\DateTime $_): Job |
||
|
|
|||
| 18 | { |
||
| 19 | if ( ! $this instanceof Command) { |
||
| 20 | throw new \LogicException('This trait must be used in Symfony console commands only.'); |
||
| 21 | } |
||
| 22 | |||
| 23 | $job = new Job($this->getName()); |
||
| 24 | $job->setMaxRuntime((integer)min(300, $this->getScheduleInterval())); |
||
| 25 | |||
| 26 | return $job; |
||
| 27 | } |
||
| 28 | |||
| 33 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.