@@ -145,7 +145,7 @@ public function getContext() : ?ReferenceContext
145145 * @param ReferenceContext $context the reference context to use for resolution.
146146 * If not specified, `getContext()` will be called to determine the context, if
147147 * that does not return a context, the UnresolvableReferenceException will be thrown.
148- * @return SpecObjectInterface the resolved spec type.
148+ * @return SpecObjectInterface|array|null the resolved spec type.
149149 * You might want to call resolveReferences() on the resolved object to recursively resolve recursive references.
150150 * This is not done automatically to avoid recursion to run into the same function again.
151151 * If you call resolveReferences() make sure to replace the Reference with the resolved object first.
@@ -172,7 +172,7 @@ public function resolve(ReferenceContext $context = null)
172172 $ baseSpec = $ context ->getBaseSpec ();
173173 if ($ baseSpec !== null ) {
174174 // TODO type error if resolved object does not match $this->_to ?
175- /** @var $referencedObject SpecObjectInterface */
175+ /** @var SpecObjectInterface $referencedObject */
176176 $ referencedObject = $ jsonReference ->getJsonPointer ()->evaluate ($ baseSpec );
177177 if ($ referencedObject instanceof SpecObjectInterface) {
178178 $ referencedObject ->setReferenceContext ($ context );
@@ -199,7 +199,7 @@ public function resolve(ReferenceContext $context = null)
199199 if (isset ($ referencedData ['$ref ' ])) {
200200 return (new Reference ($ referencedData , $ this ->_to ))->resolve (new ReferenceContext (null , $ file ));
201201 }
202- /** @var $referencedObject SpecObjectInterface|array */
202+ /** @var SpecObjectInterface|array $referencedObject */
203203 $ referencedObject = $ this ->_to !== null ? new $ this ->_to ($ referencedData ) : $ referencedData ;
204204
205205 if ($ jsonReference ->getJsonPointer ()->getPointer () === '' ) {
0 commit comments