Completed
Push — master ( 7e6b92...936a45 )
by Anton
08:09
created

AnnotatedClass::getAnnotation()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * Spiral Framework.
4
 *
5
 * @license   MIT
6
 * @author    Anton Titov (Wolfy-J)
7
 */
8
declare(strict_types=1);
9
10
namespace Spiral\Annotations;
11
12
final class AnnotatedClass
13
{
14
    /** @var \ReflectionClass */
15
    private $class;
16
17
    /** @var mixed */
18
    private $annotation;
19
20
    /**
21
     * @param \ReflectionClass $class
22
     * @param mixed            $annotation
23
     */
24
    public function __construct(\ReflectionClass $class, $annotation)
25
    {
26
        $this->class = $class;
27
        $this->annotation = $annotation;
28
    }
29
30
    /**
31
     * @return \ReflectionClass
32
     */
33
    public function getClass(): \ReflectionClass
34
    {
35
        return $this->class;
36
    }
37
38
    /**
39
     * @return mixed
40
     */
41
    public function getAnnotation()
42
    {
43
        return $this->annotation;
44
    }
45
}