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
Push — master ( 83db66...8ac73c )
by Jérémiah
21:08
created

IsGranted::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1.037

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 9
ccs 4
cts 6
cp 0.6667
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 1
crap 1.037
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 Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
9
10
final class IsGranted extends ExpressionFunction
11
{
12 136
    public function __construct(AuthorizationCheckerInterface $authorizationChecker)
13
    {
14 136
        parent::__construct(
15 136
            'isGranted',
16
            function ($attributes, $object = null) {
17
                return "\$globalVariable->get('container')->get('security.authorization_checker')->isGranted($attributes, $object)";
18 136
            },
19
            function ($_, $attributes, $object = null) use ($authorizationChecker) {
20
                return $authorizationChecker->isGranted($attributes, $object);
21 136
            }
22
        );
23 136
    }
24
}
25