Md5   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 30
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0
wmc 6

4 Methods

Rating   Name   Duplication   Size   Complexity  
A override_md5() 0 3 1
A override_md5_file() 0 3 1
A md5_file() 0 7 2
A md5() 0 7 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Hgraca\DoctrineTestDbRegenerationBundle\StdLib;
6
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
35
    {
36 2
        self::override('md5', $callable);
37 2
    }
38
}
39