Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#237)
by Jérémiah
08:38
created

ExpressionProcessor::process()   A

Complexity

Conditions 4
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 4

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 7
cts 7
cp 1
rs 9.2
c 0
b 0
f 0
cc 4
eloc 8
nc 1
nop 2
crap 4
1
<?php
2
3
namespace Overblog\GraphQLBundle\Config\Processor;
4
5
use Symfony\Component\ExpressionLanguage\Expression;
6
7
final class ExpressionProcessor implements ProcessorInterface
8
{
9
    const DEFAULT_EXPRESSION_LANGUAGE_TRIGGER = '@=';
10
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public static function process(array $configs, $expressionLanguageTrigger = self::DEFAULT_EXPRESSION_LANGUAGE_TRIGGER)
15
    {
16 25
        return array_map(function ($v) use ($expressionLanguageTrigger) {
17 25
            if (is_array($v)) {
18 25
                return static::process($v, $expressionLanguageTrigger);
19 25
            } elseif (is_string($v) && 0 === strpos($v, $expressionLanguageTrigger)) {
20 19
                return new Expression(substr($v, 2));
21
            }
22
23 25
            return $v;
24 25
        }, $configs);
25
    }
26
}
27