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 (#682)
by Timur
06:41
created

ExpressionConverter::check()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
ccs 4
cts 4
cp 1
rs 10
cc 2
nc 2
nop 1
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Generator\Converter;
6
7
use Murtukov\PHPCodeGenerator\ConverterInterface;
8
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionLanguage;
9
10
class ExpressionConverter implements ConverterInterface
11
{
12
    private ExpressionLanguage $expressionLanguage;
13
14 143
    public function __construct(ExpressionLanguage $expressionLanguage)
15
    {
16 143
        $this->expressionLanguage = $expressionLanguage;
17 143
    }
18
19 26
    public function convert($value)
20
    {
21 26
        return $this->expressionLanguage->compile(
22 26
            ExpressionLanguage::unprefixExpression($value),
23 26
            ExpressionLanguage::KNOWN_NAMES
24
        );
25
    }
26
27 37
    public function check($maybeExpression): bool
28
    {
29 37
        if (\is_string($maybeExpression)) {
30 37
            return ExpressionLanguage::stringHasTrigger($maybeExpression);
31
        }
32
33 3
        return false;
34
    }
35
}
36