Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
15 | 15 | public function __construct(MapInterface $consumers = null) |
|
16 | { |
||
17 | 15 | $consumers = $consumers ?? new Map('string', 'callable'); |
|
18 | |||
19 | if ( |
||
20 | 15 | (string) $consumers->keyType() !== 'string' || |
|
21 | 15 | (string) $consumers->valueType() !== 'callable' |
|
22 | ) { |
||
23 | 2 | throw new \TypeError('Argument 1 must be of type MapInterface<string, callable>'); |
|
24 | } |
||
25 | |||
26 | 13 | $this->consumers = $consumers; |
|
27 | 13 | } |
|
39 |