Total Complexity | 6 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | final class Md5 extends AbstractStaticClass |
||
8 | { |
||
9 | use NativeOverride; |
||
10 | |||
11 | 12 | public static function md5_file(string $filePath): string |
|
12 | { |
||
13 | 12 | if (isset(self::$overrideList['md5_file'])) { |
|
14 | 2 | return (self::$overrideList['md5_file'])($filePath); |
|
15 | } |
||
16 | |||
17 | 10 | return md5_file($filePath); |
|
18 | } |
||
19 | |||
20 | 2 | public static function override_md5_file(callable $callable): void |
|
21 | { |
||
22 | 2 | self::override('md5_file', $callable); |
|
23 | 2 | } |
|
24 | |||
25 | 12 | public static function md5(string $filePath): string |
|
26 | { |
||
27 | 12 | if (isset(self::$overrideList['md5'])) { |
|
28 | 2 | return (self::$overrideList['md5'])($filePath); |
|
29 | } |
||
30 | |||
31 | 10 | return md5($filePath); |
|
32 | } |
||
33 | |||
34 | 2 | public static function override_md5(callable $callable): void |
|
37 | 2 | } |
|
38 | } |
||
39 |