Completed
Push — master ( e238c3...0855a3 )
by Pol
13:48 queued 01:17
created

ClosureObject::hash()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace drupol\valuewrapper\Object;
4
5
use SuperClosure\Serializer;
6
7
/**
8
 * Class ClosureObject
9
 */
10
class ClosureObject extends ObjectValue
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15 1
    public function hash(): string
16
    {
17 1
        $serializer = new Serializer();
18
19 1
        return $this->doHash($serializer->serialize($this->value));
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25 1
    public function __invoke()
26
    {
27 1
        return \call_user_func_array($this->value, \func_get_args());
28
    }
29
}
30