| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | 4 | public static function forExtensionIdentifier(BaseExtension $extension, string $identifier): self |
|
| 14 | { |
||
| 15 | 4 | $extensionName = (new ReflectionClass($extension))->getShortName(); |
|
| 16 | |||
| 17 | 4 | return new self(sprintf( |
|
| 18 | 4 | "%s identifier: '%s' is not valid; it must comprise only ASCII alphanumerics and hyphen", |
|
| 19 | 4 | $extensionName, |
|
| 20 | 4 | $identifier |
|
| 21 | )); |
||
| 22 | } |
||
| 23 | } |
||
| 24 |