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

TypeValue   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A hash() 0 4 1
A getType() 0 4 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