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

Passed
Pull Request — master (#684)
by
unknown
07:23
created

ExpressionProcessor   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
eloc 9
dl 0
loc 18
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 11 4
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Config\Processor;
6
7
use Symfony\Component\ExpressionLanguage\Expression;
8
9
final class ExpressionProcessor implements ProcessorInterface
10
{
11
    public const DEFAULT_EXPRESSION_LANGUAGE_TRIGGER = '@=';
12
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public static function process(array $configs, $expressionLanguageTrigger = self::DEFAULT_EXPRESSION_LANGUAGE_TRIGGER): array
17
    {
18
        return \array_map(function ($v) use ($expressionLanguageTrigger) {
19
            if (\is_array($v)) {
20
                return static::process($v, $expressionLanguageTrigger);
21
            } elseif (\is_string($v) && 0 === \strpos($v, $expressionLanguageTrigger)) {
22
                return new Expression(\substr($v, 2));
23
            }
24
25
            return $v;
26
        }, $configs);
27
    }
28
}
29