Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
17 | 114 | public function setContainer(DefinitionContainerInterface $container): ContainerAwareInterface |
|
18 | { |
||
19 | 114 | $this->container = $container; |
|
20 | |||
21 | 114 | if ($this instanceof ContainerAwareInterface) { |
|
22 | 114 | 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 | )); |
||
30 | } |
||
31 | |||
41 |