Completed
Push — master ( f6d952...557c00 )
by Pol
02:56
created

BooleanType::hash()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
crap 2
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace drupol\valuewrapper\Type;
6
7
/**
8
 * Class BooleanType
9
 */
10
class BooleanType extends TypeValue
11
{
12
    /**
13
     * BooleanType constructor.
14
     *
15
     * @param bool $value
16
     */
17 9
    public function __construct(bool $value)
18
    {
19 9
        parent::__construct($value);
20 9
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25 1
    public function __toString(): string
26
    {
27 1
        throw new \BadMethodCallException('Unable to convert a boolean to string.');
28
    }
29
}
30