Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | 8 | public function getQueue($object): ?string |
|
37 | { |
||
38 | 8 | $reflection = new \ReflectionClass($object); |
|
39 | |||
40 | 8 | $attribute = $this->reader->firstClassMetadata($reflection, Queueable::class); |
|
41 | 8 | if ($attribute !== null) { |
|
42 | 2 | return $attribute->queue; |
|
43 | } |
||
44 | |||
45 | 6 | if (\is_object($object) && $reflection->hasMethod('getQueue')) { |
|
46 | 2 | return $reflection->getMethod('getQueue')->invoke($object); |
|
47 | } |
||
48 | |||
49 | 4 | return null; |
|
50 | } |
||
52 |