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

FilterParser::parseValuePath()   A

Complexity

Conditions 4
Paths 2

Size

Total Lines 21
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 4
eloc 10
nc 2
nop 2
dl 0
loc 21
rs 9.9332
c 1
b 0
f 0
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