1 | <?php |
||
22 | class AnnotationReader implements ReaderInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | const READER_NAME = 'annotation'; |
||
28 | |||
29 | /** |
||
30 | * @var DoctrineAnnotationsReaderInterface |
||
31 | */ |
||
32 | protected $reader; |
||
33 | |||
34 | /** |
||
35 | * Имя класса адаптера для чтения анотаций |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $doctrineAnnotationReaderClassName = DoctrineAnnotationReader::class; |
||
40 | |||
41 | /** |
||
42 | * Кеш загруженных метаданных |
||
43 | * |
||
44 | * @var MetadataInterface[] |
||
45 | */ |
||
46 | protected $classAnnotations = []; |
||
47 | |||
48 | /** |
||
49 | * |
||
50 | * @throws Exception\AnnotationReaderException |
||
51 | */ |
||
52 | public function __construct() |
||
56 | |||
57 | /** |
||
58 | * Иницилазия |
||
59 | * |
||
60 | * @return void |
||
61 | * @throws Exception\AnnotationReaderException |
||
62 | */ |
||
63 | protected function init() |
||
73 | |||
74 | /** |
||
75 | * Получение метаданных для сервиса, по имени класса сервиса и вызываемому методу |
||
76 | * |
||
77 | * @param string $serviceClassName |
||
78 | * @param string $serviceMethod |
||
79 | * |
||
80 | * @return MetadataInterface |
||
81 | * |
||
82 | * @throws Exception\AnnotationReaderException |
||
83 | * |
||
84 | * @throws \OldTown\Workflow\ZF2\Service\Metadata\Reader\Exception\InvalidDoctrineAnnotationsReaderException |
||
85 | * @throws \OldTown\Workflow\ZF2\Service\Metadata\Storage\Exception\InvalidArgumentMapException |
||
86 | * @throws Exception\InvalidMetadataException |
||
87 | * @throws \OldTown\Workflow\ZF2\Service\Metadata\Storage\Exception\InvalidResultMapException |
||
88 | */ |
||
89 | public function loadMetadataForClassService($serviceClassName, $serviceMethod) |
||
124 | |||
125 | /** |
||
126 | * @return DoctrineAnnotationsReaderInterface |
||
127 | * |
||
128 | * @throws Exception\InvalidDoctrineAnnotationsReaderException |
||
129 | */ |
||
130 | public function getReader() |
||
151 | |||
152 | /** |
||
153 | * @param DoctrineAnnotationsReaderInterface $reader |
||
154 | * |
||
155 | * @return $this |
||
156 | */ |
||
157 | public function setReader(DoctrineAnnotationsReaderInterface $reader) |
||
163 | |||
164 | /** |
||
165 | * Имя класса адаптера для чтения анотаций |
||
166 | * |
||
167 | * @return string |
||
168 | */ |
||
169 | public function getDoctrineAnnotationReaderClassName() |
||
173 | |||
174 | /** |
||
175 | * Устанавливает имя класса адаптера для чтения анотаций |
||
176 | * |
||
177 | * @param string $doctrineAnnotationReaderClassName |
||
178 | * |
||
179 | * @return $this |
||
180 | */ |
||
181 | public function setDoctrineAnnotationReaderClassName($doctrineAnnotationReaderClassName) |
||
187 | } |
||
188 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: