Total Complexity | 6 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class AnnotationResolver |
||
14 | { |
||
15 | |||
16 | /** |
||
17 | * @var ReflectionProperty |
||
18 | */ |
||
19 | protected $reflection; |
||
20 | |||
21 | /** @var ?Reader */ |
||
22 | protected static $reader; |
||
23 | |||
24 | /** |
||
25 | * TypeResolver constructor. |
||
26 | * @param ReflectionProperty $reflection |
||
27 | */ |
||
28 | public function __construct(ReflectionProperty $reflection) |
||
31 | } |
||
32 | |||
33 | public function resolve() : array |
||
34 | { |
||
35 | $annotations = []; |
||
36 | foreach (self::getReader()->getPropertyAnnotations($this->reflection) as $annotation) { |
||
37 | $annotations[get_class($annotation)] = $annotation; |
||
38 | } |
||
39 | return $annotations; |
||
40 | } |
||
41 | |||
42 | public static function setReader(Reader $reader) |
||
46 | } |
||
47 | |||
48 | protected static function getReader(): Reader |
||
55 | } |
||
56 | |||
57 | } |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.