Negation::dump()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the tmilos/scim-filter-parser package.
5
 *
6
 * (c) Milos Tomic <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Tmilos\ScimFilterParser\Ast;
13
14
class Negation extends Factor
15
{
16
    /** @var Filter */
17
    public $filter;
18
19
    /**
20
     * @param Filter $filter
21
     */
22
    public function __construct(Filter $filter)
23
    {
24
        $this->filter = $filter;
25
    }
26
27
    /**
28
     * @return Filter
29
     */
30
    public function getFilter()
31
    {
32
        return $this->filter;
33
    }
34
35
    public function __toString()
36
    {
37
        return sprintf('not (%s)', $this->filter);
38
    }
39
40
    public function dump()
41
    {
42
        return [
43
            'Negation' => $this->filter->dump(),
44
        ];
45
    }
46
}
47