| Conditions | 4 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | private static function getIdFromProviderFqcn(string $fqcn): ?string { |
||
| 49 | $prefix = 'OCA\\TwoFactorGateway\\Provider\\Channel\\SMS\\Provider\\Drivers\\'; |
||
| 50 | if (strncmp($fqcn, $prefix, strlen($prefix)) !== 0) { |
||
| 51 | return null; |
||
| 52 | } |
||
| 53 | $type = substr($fqcn, strlen($prefix)); |
||
| 54 | if (strpos($type, '\\') !== false) { |
||
| 55 | return null; |
||
| 56 | } |
||
| 57 | return $type !== '' ? strtolower($type) : null; |
||
| 58 | } |
||
| 60 |