Total Complexity | 7 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class Sanitiser |
||
8 | { |
||
9 | /** |
||
10 | * you can fill this variable like this: |
||
11 | * ```php |
||
12 | * Sunnysideup\Ecommerce\Product => 'Product' |
||
13 | * ```. |
||
14 | * |
||
15 | * @var array |
||
16 | */ |
||
17 | private static $scramble_registry = []; |
||
18 | |||
19 | public static function sanitise(string $className): string |
||
20 | { |
||
21 | return str_replace('\\', '-', $className); |
||
22 | } |
||
23 | |||
24 | public static function unsanitise(string $className): string |
||
25 | { |
||
26 | return str_replace('-', '\\', $className); |
||
27 | } |
||
28 | |||
29 | public static function scramble(string $className): string |
||
37 | } |
||
38 | |||
39 | public static function unscramble(string $className): string |
||
48 | } |
||
49 | |||
50 | protected static function get_registry(): array |
||
55 |