Conditions | 3 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 7 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
56 | public function setContainer($container) |
||
57 | { |
||
58 | if (!($container instanceof PsrContainerInterface) && !($container instanceof ContainerInterface)) { |
||
59 | throw new \InvalidArgumentException('$contaner should be instance of Symfony\Component\DependencyInjection\ContainerInterface or Psr\Container\ContainerInterface'); |
||
60 | } |
||
61 | $this->container = $container; |
||
62 | } |
||
63 | } |
||
64 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.