Passed
Push — develop ( f06ad8...0b7207 )
by Maarten de
01:39
created

FilterParser::parseValuePath()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
nc 2
nop 2
dl 0
loc 9
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cloudstek\SCIM\FilterParser;
6
7
use Cloudstek\SCIM\FilterParser\Exception\InvalidValuePathException;
0 ignored issues
show
Bug introduced by
The type Cloudstek\SCIM\FilterPar...validValuePathException was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Nette\Tokenizer;
9
10
/**
11
 * SCIM Filter Parser.
12
 */
13
class FilterParser extends AbstractParser implements FilterParserInterface
14
{
15
    /**
16
     * SCIM Filter Parser.
17
     */
18
    public function __construct()
19
    {
20
        parent::__construct(ParserMode::FILTER());
21
    }
22
23
    /**
24
     * Parse filter string.
25
     *
26
     * @param string $input Filter.
27
     *
28
     * @throws Tokenizer\Exception
29
     *
30
     * @return AST\Node|null
31
     */
32
    public function parse(string $input): ?AST\Node
33
    {
34
        $stream = $this->tokenizer->tokenize($input);
35
36
        return $this->parseInner($stream);
37
    }
38
}
39