| Total Complexity | 5 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | abstract class StreamWrapperRegistrar |
||
| 8 | { |
||
| 9 | 1 | public static function registerFor(StreamRegistrarInterface $registrar): void |
|
| 10 | { |
||
| 11 | 1 | $protocol = static::protocol($registrar); |
|
| 12 | |||
| 13 | 1 | if (!\in_array($protocol, \stream_get_wrappers(), true)) { |
|
| 14 | 1 | \stream_wrapper_register($protocol, StreamWrapper::class); |
|
| 15 | } |
||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @codeCoverageIgnore |
||
| 20 | */ |
||
| 21 | public static function unregisterFor(StreamRegistrarInterface $registrar): void |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 30 | 15 | public static function protocol(StreamRegistrarInterface $registrar): string |
|
| 35 |