| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3.0261 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | 6 | public function findQueueable($object): ?Queueable |
|
| 16 | { |
||
| 17 | 6 | $reflection = new \ReflectionClass($object); |
|
| 18 | |||
| 19 | 6 | if ($reflection->isInterface()) { |
|
| 20 | return null; |
||
| 21 | } |
||
| 22 | |||
| 23 | 6 | if ($reflection->implementsInterface(QueueableInterface::class)) { |
|
| 24 | 3 | return $this->createQueueable($reflection, $object); |
|
| 25 | } |
||
| 26 | |||
| 27 | 3 | return (new Factory())->create()->firstClassMetadata($reflection, Queueable::class); |
|
| 28 | } |
||
| 44 |