Completed
Push — master ( 7e4b7e...89d185 )
by Mariano
07:50 queued 03:56
created

getAnnotationsFromProperty()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 1 Features 2
Metric Value
c 2
b 1
f 2
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
namespace Mcustiel\SimpleRequest\Services;
3
4
use Mcustiel\SimpleRequest\Interfaces\AnnotationService;
5
use Doctrine\Common\Annotations\AnnotationReader;
6
7
class DoctrineAnnotationService implements AnnotationService
8
{
9
    /**
10
     * @var \Doctrine\Common\Annotations\AnnotationReader
11
     */
12
    private $annotationReader;
13
14 97
    public function __construct()
15
    {
16 97
        $this->annotationReader = new AnnotationReader();
17 97
    }
18
19
    /**
20
     * {@inheritDoc}
21
     *
22
     * @see \Mcustiel\SimpleRequest\Interfaces\AnnotationService::getAnnotationsFromProperty()
23
     */
24 93
    public function getAnnotationsFromProperty(\ReflectionProperty $property)
25
    {
26 93
        return $this->annotationReader->getPropertyAnnotations($property);
27
    }
28
}
29