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

Test Failed
Pull Request — master (#4)
by Jérémiah
12:13
created

Resolver   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B defaultResolveFn() 0 18 6
1
<?php
2
3
namespace Overblog\GraphQLBundle\Resolver;
4
5
use GraphQL\Type\Definition\ResolveInfo;
6
use Symfony\Component\PropertyAccess\Exception\AccessException;
7
use Symfony\Component\PropertyAccess\PropertyAccess;
8
9
class Resolver
10
{
11
    public static function defaultResolveFn($source, $args, ResolveInfo $info)
0 ignored issues
show
Unused Code introduced by
The parameter $args is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
12
    {
13
        $fieldName = $info->fieldName;
14
        $property = null;
15
16
        $accessor = PropertyAccess::createPropertyAccessor();
17
18
        try {
19
            if (is_array($source) || $source instanceof \ArrayAccess) {
20
                $property = $accessor->getValue($source, sprintf('[%s]', $fieldName));
21
            } else if (is_object($source)) {
22
                $property = $accessor->getValue($source, sprintf('%s', $fieldName));
23
            }
24
        } catch(AccessException $e) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
25
        }
26
27
        return $property instanceof \Closure ? $property($source) : $property;
28
    }
29
}
30
31