@@ -122,8 +122,6 @@ public function __construct(?FqsenResolver $fqsenResolver = null)
122
122
* @uses Context::getNamespace() to determine with what to prefix the type name.
123
123
*
124
124
* @param string $type The relative or absolute type.
125
- *
126
- * @psalm-pure
127
125
*/
128
126
public function resolve (string $ type , ?Context $ context = null ) : Type
129
127
{
@@ -160,8 +158,6 @@ public function resolve(string $type, ?Context $context = null) : Type
160
158
* @param ArrayIterator<int, string|null> $tokens the iterator on tokens
161
159
* @param int $parserContext on of self::PARSER_* constants, indicating
162
160
* the context where we are in the parsing
163
- *
164
- * @psalm-pure
165
161
*/
166
162
private function parseTypes (ArrayIterator $ tokens , Context $ context , int $ parserContext ) : Type
167
163
{
@@ -173,7 +169,9 @@ private function parseTypes(ArrayIterator $tokens, Context $context, int $parser
173
169
throw new RuntimeException (
174
170
'Unexpected nullable character '
175
171
);
176
- } elseif ($ token === '| ' ) {
172
+ }
173
+
174
+ if ($ token === '| ' ) {
177
175
if (count ($ types ) === 0 ) {
178
176
throw new RuntimeException (
179
177
'A type is missing before a type separator '
@@ -428,9 +426,7 @@ private function resolveTypedObject(string $type, ?Context $context = null) : Ob
428
426
/**
429
427
* Resolves class string
430
428
*
431
- * @param ArrayIterator<int, null|string> $tokens
432
- *
433
- * @psalm-pure
429
+ * @param ArrayIterator<int, (string|null)> $tokens
434
430
*/
435
431
private function resolveClassString (ArrayIterator $ tokens , Context $ context ) : Type
436
432
{
@@ -463,11 +459,9 @@ private function resolveClassString(ArrayIterator $tokens, Context $context) : T
463
459
/**
464
460
* Resolves the collection values and keys
465
461
*
466
- * @param ArrayIterator<int, null| string> $tokens
462
+ * @param ArrayIterator<int, ( string|null) > $tokens
467
463
*
468
464
* @return Array_|Iterable_|Collection
469
- *
470
- * @psalm-mutation-free
471
465
*/
472
466
private function resolveCollection (ArrayIterator $ tokens , Type $ classType , Context $ context ) : Type
473
467
{
0 commit comments