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

DoctrineAnnotationService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 2
Metric Value
wmc 2
c 2
b 1
f 2
lcom 1
cbo 1
dl 0
loc 22
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAnnotationsFromProperty() 0 4 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