| Conditions | 5 |
| Paths | 4 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 4 | public function process(\ReflectionClass $reflection, Definition $definition) |
|
| 24 | { |
||
| 25 | 4 | $annotations = $this->reader->getClassAnnotations($reflection); |
|
| 26 | |||
| 27 | 4 | foreach ($annotations as $annotation) |
|
| 28 | { |
||
| 29 | 4 | if ($annotation instanceof Link) { |
|
| 30 | 3 | $link = $this->createLink($annotation); |
|
| 31 | |||
| 32 | 3 | $definition->addLink($link); |
|
| 33 | 3 | continue; |
|
| 34 | } |
||
| 35 | |||
| 36 | 3 | if ($annotation instanceof ResourceIdentifier && $annotation->type !== null) { |
|
| 37 | 3 | $definition->setType($annotation->type); |
|
| 38 | } |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |