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 |
||
17 | 138 | public function setContainer(DefinitionContainerInterface $container): ContainerAwareInterface |
|
18 | { |
||
19 | 138 | $this->container = $container; |
|
20 | |||
21 | 138 | if ($this instanceof ContainerAwareInterface) { |
|
22 | 138 | return $this; |
|
23 | } |
||
24 | |||
25 | 3 | throw new BadMethodCallException(sprintf( |
|
26 | 3 | 'Attempt to use (%s) while not implementing (%s)', |
|
27 | 3 | ContainerAwareTrait::class, |
|
28 | 3 | ContainerAwareInterface::class |
|
29 | 3 | )); |
|
41 |