@@ -123,8 +123,6 @@ public function __construct(?FqsenResolver $fqsenResolver = null)
123123 * @uses Context::getNamespace() to determine with what to prefix the type name.
124124 *
125125 * @param string $type The relative or absolute type.
126- *
127- * @psalm-pure
128126 */
129127 public function resolve (string $ type , ?Context $ context = null ) : Type
130128 {
@@ -161,8 +159,6 @@ public function resolve(string $type, ?Context $context = null) : Type
161159 * @param ArrayIterator<int, string|null> $tokens the iterator on tokens
162160 * @param int $parserContext on of self::PARSER_* constants, indicating
163161 * the context where we are in the parsing
164- *
165- * @psalm-pure
166162 */
167163 private function parseTypes (ArrayIterator $ tokens , Context $ context , int $ parserContext ) : Type
168164 {
@@ -175,7 +171,9 @@ private function parseTypes(ArrayIterator $tokens, Context $context, int $parser
175171 throw new RuntimeException (
176172 'Unexpected nullable character '
177173 );
178- } elseif ($ token === '| ' || $ token === '& ' ) {
174+ }
175+
176+ if ($ token === '| ' || $ token === '& ' ) {
179177 if (count ($ types ) === 0 ) {
180178 throw new RuntimeException (
181179 'A type is missing before a type separator '
@@ -411,9 +409,7 @@ private function resolveTypedObject(string $type, ?Context $context = null) : Ob
411409 /**
412410 * Resolves class string
413411 *
414- * @param ArrayIterator<int, null|string> $tokens
415- *
416- * @psalm-pure
412+ * @param ArrayIterator<int, (string|null)> $tokens
417413 */
418414 private function resolveClassString (ArrayIterator $ tokens , Context $ context ) : Type
419415 {
@@ -446,11 +442,9 @@ private function resolveClassString(ArrayIterator $tokens, Context $context) : T
446442 /**
447443 * Resolves the collection values and keys
448444 *
449- * @param ArrayIterator<int, null| string> $tokens
445+ * @param ArrayIterator<int, ( string|null) > $tokens
450446 *
451447 * @return Array_|Iterable_|Collection
452- *
453- * @psalm-mutation-free
454448 */
455449 private function resolveCollection (ArrayIterator $ tokens , Type $ classType , Context $ context ) : Type
456450 {
0 commit comments