| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | function assertMap(string $key, string $value, MapInterface $map, int $position = null): void |
||
| 26 | { |
||
| 27 | $message = ''; |
||
| 28 | |||
| 29 | if (is_int($position)) { |
||
| 30 | $message = "Argument $position must be of type MapInterface<$key, $value>"; |
||
| 31 | } |
||
| 32 | |||
| 33 | if ( |
||
| 34 | (string) $map->keyType() !== $key || |
||
| 35 | (string) $map->valueType() !== $value |
||
| 36 | ) { |
||
| 37 | throw new \TypeError($message); |
||
| 38 | } |
||
| 56 |