| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function onScheduledExecution() |
||
| 23 | { |
||
| 24 | $type = $this->getTypeInstance(); |
||
| 25 | if ($type && $type->hasMethod('getJobName')) { |
||
| 26 | // find which job needs to be added |
||
| 27 | $jobName = $type->getJobName(); |
||
| 28 | Injector::inst()->get(QueuedJobService::class)->queueJob( |
||
| 29 | Injector::inst()->create($jobName) |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 54 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.