Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function __construct($name) |
||
22 | { |
||
23 | $this->name = (string)$name; |
||
24 | if (!class_exists($this->name)) { |
||
25 | throw new \LogicException(sprintf('Class %s does not exist', $name)); |
||
26 | } |
||
27 | if (!in_array(StaticApiFactoryInterface::class, class_implements($name), true)) { |
||
28 | throw new \LogicException(sprintf('Class %s is not a static factory', $name)); |
||
29 | } |
||
30 | } |
||
31 | |||
40 |