Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 6 | public function setContainer(ContainerInterface $container): ContainerAwareInterface |
|
23 | { |
||
24 | 6 | $this->container = $container; |
|
25 | |||
26 | 6 | if ($this instanceof ContainerAwareInterface) { |
|
27 | 3 | return $this; |
|
28 | } |
||
29 | |||
30 | 3 | throw new RuntimeException(sprintf( |
|
31 | 3 | 'Trait (%s) must be consumed by an instance of (%s)', |
|
32 | 3 | __TRAIT__, |
|
33 | 3 | ContainerAwareInterface::class |
|
34 | )); |
||
37 |