@@ -145,7 +145,7 @@ public function getContext() : ?ReferenceContext
145
145
* @param ReferenceContext $context the reference context to use for resolution.
146
146
* If not specified, `getContext()` will be called to determine the context, if
147
147
* 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.
149
149
* You might want to call resolveReferences() on the resolved object to recursively resolve recursive references.
150
150
* This is not done automatically to avoid recursion to run into the same function again.
151
151
* 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)
172
172
$ baseSpec = $ context ->getBaseSpec ();
173
173
if ($ baseSpec !== null ) {
174
174
// TODO type error if resolved object does not match $this->_to ?
175
- /** @var $referencedObject SpecObjectInterface */
175
+ /** @var SpecObjectInterface $referencedObject */
176
176
$ referencedObject = $ jsonReference ->getJsonPointer ()->evaluate ($ baseSpec );
177
177
if ($ referencedObject instanceof SpecObjectInterface) {
178
178
$ referencedObject ->setReferenceContext ($ context );
@@ -199,7 +199,7 @@ public function resolve(ReferenceContext $context = null)
199
199
if (isset ($ referencedData ['$ref ' ])) {
200
200
return (new Reference ($ referencedData , $ this ->_to ))->resolve (new ReferenceContext (null , $ file ));
201
201
}
202
- /** @var $referencedObject SpecObjectInterface|array */
202
+ /** @var SpecObjectInterface|array $referencedObject */
203
203
$ referencedObject = $ this ->_to !== null ? new $ this ->_to ($ referencedData ) : $ referencedData ;
204
204
205
205
if ($ jsonReference ->getJsonPointer ()->getPointer () === '' ) {
0 commit comments