1
|
|
|
<?php declare(strict_types=1); |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* @license http://opensource.org/licenses/mit-license.php MIT |
5
|
|
|
* @link https://github.com/nicoSWD |
6
|
|
|
* @author Nicolas Oelgart <[email protected]> |
7
|
|
|
*/ |
8
|
|
|
namespace nicoSWD\Rule\Expression; |
9
|
|
|
|
10
|
|
|
use nicoSWD\Rule\Parser\Exception\ParserException; |
|
|
|
|
11
|
|
|
use nicoSWD\Rule\TokenStream\Token; |
12
|
|
|
use nicoSWD\Rule\TokenStream\Token\Type\Operator; |
13
|
|
|
|
14
|
|
|
final class ExpressionFactory implements ExpressionFactoryInterface |
15
|
|
|
{ |
16
|
|
|
/** @throws ParserException */ |
17
|
|
|
public function createFromOperator(Operator $operator): BaseExpression |
18
|
|
|
{ |
19
|
|
|
return match ($operator::class) { |
20
|
|
|
Token\TokenEqual::class => new EqualExpression(), |
21
|
|
|
Token\TokenEqualStrict::class => new EqualStrictExpression(), |
22
|
|
|
Token\TokenNotEqual::class => new NotEqualExpression(), |
23
|
|
|
Token\TokenNotEqualStrict::class => new NotEqualStrictExpression(), |
24
|
|
|
Token\TokenGreater::class => new GreaterThanExpression(), |
25
|
|
|
Token\TokenSmaller::class => new LessThanExpression(), |
26
|
|
|
Token\TokenSmallerEqual::class => new LessThanEqualExpression(), |
27
|
|
|
Token\TokenGreaterEqual::class => new GreaterThanEqualExpression(), |
28
|
218 |
|
Token\TokenIn::class => new InExpression(), |
29
|
|
|
Token\TokenNotIn::class => new NotInExpression(), |
30
|
218 |
|
default => throw ParserException::unknownOperator($operator), |
31
|
|
|
}; |
32
|
|
|
} |
33
|
|
|
} |
34
|
|
|
|
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths