GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

getMethodAnnotations()   A
last analyzed

Complexity

Conditions 3
Paths 3

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 3

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 7
cts 7
cp 1
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 7
nc 3
nop 1
crap 3
1
<?php
2
3
namespace Reflection\Validator\Annotation;
4
5
use Doctrine\Common\Annotations\SimpleAnnotationReader;
6
7
/**
8
 * Adds an ability to validate a method reflecting the annotation.
9
 */
10
class ReflectionValidatorAnnotationReader extends SimpleAnnotationReader
11
{
12
    /**
13
     * {@inheritdoc}
14
     *
15
     * @throws \Exception
16
     *   When one of the annotations treated as invalid.
17
     */
18 2
    public function getMethodAnnotations(\ReflectionMethod $method)
19
    {
20 2
        $annotations = [];
21
22 2
        foreach (parent::getMethodAnnotations($method) as $i => $annotation) {
23 2
            if ($annotation instanceof ReflectionValidatorMethodAnnotationInterface) {
24 2
                $annotation->validate($method);
25
            }
26
27 1
            $annotations[$i] = $annotation;
28
        }
29
30 1
        return $annotations;
31
    }
32
}
33