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 (#536)
by
unknown
19:46
created

GetUser::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1.0046

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 9
ccs 5
cts 6
cp 0.8333
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1.0046
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction\Security;
6
7
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction;
8
use function sprintf;
9
use Symfony\Component\Security\Core\Security;
10
use Symfony\Component\Security\Core\User\UserInterface;
11
12
final class GetUser extends ExpressionFunction
13
{
14 138
    public function __construct(Security $security)
15
    {
16 138
        parent::__construct(
17 138
            'getUser',
18
            function (): string {
19 9
                return sprintf('\%s::getUser($globalVariable)', Helper::class);
20 138
            },
21
            function () use ($security): ?UserInterface {
22
                return $security->getUser();
23 138
            }
24
        );
25 138
    }
26
}
27