BooleanNode   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
eloc 7
dl 0
loc 24
c 0
b 0
f 0
ccs 0
cts 16
cp 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A jsonSerialize() 0 3 1
A getValue() 0 3 1
A setValue() 0 3 1
A __construct() 0 5 1
1
<?php declare(strict_types=1);
2
3
namespace DaveRandom\Jom;
4
5
final class BooleanNode extends Node
6
{
7
    private $value;
8
9
    public function __construct(?bool $value = false, ?Document $ownerDocument = null)
10
    {
11
        parent::__construct($ownerDocument);
12
13
        $this->value = $value ?? false;
14
    }
15
16
    public function getValue(): bool
17
    {
18
        return $this->value;
19
    }
20
21
    public function setValue(bool $value): void
22
    {
23
        $this->value = $value;
24
    }
25
26
    public function jsonSerialize(): bool
27
    {
28
        return $this->value;
29
    }
30
}
31