Conditions | 3 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.3332 |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | 20 | public function __construct($wrapper, $wrapper_file = '') |
|
16 | { |
||
17 | 20 | if (!class_exists($wrapper)) { |
|
18 | require $wrapper_file; |
||
19 | } |
||
20 | 20 | $ref = new ReflectionClass($wrapper); |
|
21 | 20 | if(!$ref->implementsInterface(ServerInterface::class)) { |
|
22 | throw new Exception("$wrapper must be instance of Laravoole\\Wrapper\\ServerInterface", 1); |
||
23 | } |
||
24 | |||
25 | 20 | $this->wrapper = $wrapper; |
|
26 | 20 | } |
|
27 | |||
42 |