ParameterHasher   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A hashParameters() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ProxyManager\Inflector\Util;
6
7
use function md5;
8
use function serialize;
9
10
/**
11
 * Converts given parameters into a likely unique hash
12
 */
13
class ParameterHasher
14
{
15
    /**
16
     * Converts the given parameters into a likely-unique hash
17
     *
18
     * @param mixed[] $parameters
19
     */
20
    public function hashParameters(array $parameters) : string
21 8
    {
22
        return md5(serialize($parameters));
23 8
    }
24
}
25