Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 0 |
1 | <?php |
||
15 | 9 | public function __construct(SerializerInterface $serializer) |
|
16 | { |
||
17 | 9 | if ($serializer instanceof Serializer === false) { |
|
18 | throw new \InvalidArgumentException(sprintf('Serializer should be instance of %s instead %s given', Serializer::class, get_class($serializer))); |
||
19 | } |
||
20 | |||
21 | 9 | $this->serializer = $serializer; |
|
22 | 9 | } |
|
23 | |||
31 | } |