Negation   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 3
eloc 8
c 3
b 0
f 0
dl 0
loc 42
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setNode() 0 6 1
A __construct() 0 5 1
A getNode() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cloudstek\SCIM\FilterParser\AST;
6
7
/**
8
 * Negation (not).
9
 */
10
class Negation extends AbstractNode
11
{
12
    private Node $node;
13
14
    /**
15
     * Negation.
16
     *
17
     * @param Node      $node
18
     * @param Node|null $parent
19
     */
20
    public function __construct(Node $node, ?Node $parent = null)
21
    {
22
        parent::__construct($parent);
23
24
        $this->setNode($node);
25
    }
26
27
    /**
28
     * Get node.
29
     *
30
     * @return Node
31
     */
32
    public function getNode(): Node
33
    {
34
        return $this->node;
35
    }
36
37
    /**
38
     * Set node.
39
     *
40
     * @param Node $node
41
     *
42
     * @return Negation
43
     *
44
     * @internal
45
     */
46
    public function setNode(Node $node): Negation
47
    {
48
        $this->node = $node;
49
        $this->node->setParent($this);
50
51
        return $this;
52
    }
53
}
54