FilterParser   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 2
b 0
f 0
dl 0
loc 24
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A parse() 0 5 1
A __construct() 0 3 1
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);
1 ignored issue
show
Bug introduced by
The type Cloudstek\SCIM\FilterParser\ParserMode 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...
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