Passed
Push — master ( 49aecd...a6523a )
by Maarten de
03:49 queued 15s
created

FilterParser::parseConnective()   A

Complexity

Conditions 6
Paths 4

Size

Total Lines 28
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 6
eloc 12
c 2
b 0
f 0
nc 4
nop 3
dl 0
loc 28
rs 9.2222
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cloudstek\SCIM\FilterParser;
6
7
use Nette\Tokenizer;
8
9
/**
10
 * SCIM Filter Parser.
11
 */
12
class FilterParser extends AbstractParser implements FilterParserInterface
13
{
14
    /**
15
     * SCIM Filter Parser.
16
     */
17
    public function __construct()
18
    {
19
        parent::__construct(ParserMode::FILTER());
20
    }
21
22
    /**
23
     * Parse filter string.
24
     *
25
     * @param string $input Filter.
26
     *
27
     * @throws Tokenizer\Exception
28
     *
29
     * @return AST\Node|null
30
     */
31
    public function parse(string $input): ?AST\Node
32
    {
33
        $stream = $this->tokenizer->tokenize($input);
34
35
        return $this->parseInner($stream);
36
    }
37
}
38