Md5::md5()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 1
dl 0
loc 7
ccs 4
cts 4
cp 1
crap 2
rs 10
c 0
b 0
f 0
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