Completed
Pull Request — master (#4)
by Mariano
04:20
created

DoctrineAnnotationService::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
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