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.
Test Failed
Push — master ( 8693c5...c238bd )
by Sergii
02:58
created

ReflectionValidatorAnnotationReader   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 23
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMethodAnnotations() 0 14 3
1
<?php
2
3
namespace Reflection\Validator\Annotation;
4
5
use Doctrine\Common\Annotations\AnnotationReader;
6
7
/**
8
 * Adds an ability to validate a method reflecting the annotation.
9
 */
10
class ReflectionValidatorAnnotationReader extends AnnotationReader
11
{
12
    /**
13
     * {@inheritdoc}
14
     *
15
     * @throws \Exception
16
     *   When one of the annotations treated as invalid.
17
     */
18
    public function getMethodAnnotations(\ReflectionMethod $method)
19
    {
20
        $annotations = [];
21
22
        foreach (parent::getMethodAnnotations($method) as $i => $annotation) {
23
            if ($annotation instanceof ReflectionValidatorMethodAnnotationInterface) {
24
                $annotation->validate($method);
25
            }
26
27
            $annotations[$i] = $annotation;
28
        }
29
30
        return $annotations;
31
    }
32
}
33