Completed
Push — master ( 60ed01...348d1d )
by Pol
11:09
created

TypeValue::doHash()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace drupol\valuewrapper\Type;
6
7
use drupol\valuewrapper\AbstractValue;
8
9
abstract class TypeValue extends AbstractValue
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14 6
    public function hash(): string
15
    {
16 6
        return $this->doHash($this->getType() . $this->get());
17
    }
18
19
    /**
20
     * {@inheritdoc}
21
     */
22 4
    public function getType()
23
    {
24 4
        return \gettype($this->get());
25
    }
26
}
27