Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
35 | 11 | public function build(ExpressionInterface $expression, array &$params = []): string |
|
36 | { |
||
37 | /** |
||
38 | * @var JsonExpression $expression |
||
39 | * @var mixed|Query $value |
||
40 | */ |
||
41 | 11 | $value = $expression->getValue(); |
|
42 | |||
43 | 11 | if ($value instanceof Query) { |
|
44 | 2 | [$sql, $params] = $this->queryBuilder->build($value, $params); |
|
45 | |||
46 | 2 | return "($sql)"; |
|
47 | } |
||
48 | |||
49 | 9 | $placeholder = self::PARAM_PREFIX . count($params); |
|
50 | 9 | $params[$placeholder] = Json::encode($value); |
|
51 | |||
52 | 9 | return "CAST($placeholder AS JSON)"; |
|
53 | } |
||
55 |
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