AnnotatedClass   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 28
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getAnnotation() 0 3 1
A getClass() 0 3 1
A __construct() 0 4 1
1
<?php
2
3
/**
4
 * Spiral Framework.
5
 *
6
 * @license   MIT
7
 * @author    Anton Titov (Wolfy-J)
8
 */
9
10
declare(strict_types=1);
11
12
namespace Spiral\Annotations;
13
14
/**
15
 * @deprecated since v2.12. Will be removed in v3.0
16
 */
17
final class AnnotatedClass
18
{
19
    /** @var \ReflectionClass */
20
    private $class;
21
22
    /** @var mixed */
23
    private $annotation;
24
25
    /**
26
     * @param mixed            $annotation
27
     */
28
    public function __construct(\ReflectionClass $class, $annotation)
29
    {
30
        $this->class = $class;
31
        $this->annotation = $annotation;
32
    }
33
34
    public function getClass(): \ReflectionClass
35
    {
36
        return $this->class;
37
    }
38
39
    /**
40
     * @return mixed
41
     */
42
    public function getAnnotation()
43
    {
44
        return $this->annotation;
45
    }
46
}
47