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
23:23
created

PropertyMetadata::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Validator\Mapping;
6
7
use ReflectionException;
8
use ReflectionMethod;
9
use ReflectionProperty;
10
use Symfony\Component\Validator\Mapping\MemberMetadata;
11
12
class PropertyMetadata extends MemberMetadata
13
{
14
    public function __construct(string $name)
15
    {
16
        parent::__construct('anonymous', $name, $name);
17
    }
18
19
    /**
20
     * @param  $object
21
     *
22
     * @return ReflectionMethod|ReflectionProperty
23
     *
24
     * @throws ReflectionException
25
     */
26
    protected function newReflectionMember($object)
27
    {
28
        $member = new ReflectionProperty($object, $this->getName());
29
        $member->setAccessible(true);
30
31
        return $member;
32
    }
33
34
    public function getPropertyValue($object)
35
    {
36
        return $this->getReflectionMember($object)->getValue($object);
0 ignored issues
show
Bug introduced by
The method getValue() does not exist on ReflectionMethod. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

36
        return $this->getReflectionMember($object)->/** @scrutinizer ignore-call */ getValue($object);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
37
    }
38
}
39