Add RFC 8941 structured field parsing #127
Annotations
25 errors
MismatchingDocblockPropertyType:
src/StructuredFields/Item.php#L12
src/StructuredFields/Item.php:12:21: MismatchingDocblockPropertyType: Parameter Amp\Http\StructuredFields\Item::$item has wrong type 'null|scalar', should be 'array<array-key, mixed>|scalar' (see https://psalm.dev/264)
|
InvalidReturnType:
src/StructuredFields/Rfc8941.php#L16
src/StructuredFields/Rfc8941.php:16:22: InvalidReturnType: The declared return type 'list<Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>>|null' for Amp\Http\StructuredFields\Rfc8941::parseList is incorrect, got 'list<Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>|null>|null' (see https://psalm.dev/011)
|
InvalidReturnStatement:
src/StructuredFields/Rfc8941.php#L35
src/StructuredFields/Rfc8941.php:35:24: InvalidReturnStatement: The inferred type 'non-empty-list<Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>|null>' does not match the declared return type 'list<Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>>|null' for Amp\Http\StructuredFields\Rfc8941::parseList (see https://psalm.dev/128)
|
InvalidReturnType:
src/StructuredFields/Rfc8941.php#L49
src/StructuredFields/Rfc8941.php:49:22: InvalidReturnType: The declared return type 'array<string, Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>>|null' for Amp\Http\StructuredFields\Rfc8941::parseDictionary is incorrect, got 'array<string, Amp\Http\StructuredFields\Boolean|Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>|null>|null' (see https://psalm.dev/011)
|
InvalidReturnStatement:
src/StructuredFields/Rfc8941.php#L80
src/StructuredFields/Rfc8941.php:80:24: InvalidReturnStatement: The inferred type 'non-empty-array<string, Amp\Http\StructuredFields\Boolean|Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>|null>' does not match the declared return type 'array<string, Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>>|null' for Amp\Http\StructuredFields\Rfc8941::parseDictionary (see https://psalm.dev/128)
|
InvalidArgument:
src/StructuredFields/Rfc8941.php#L120
src/StructuredFields/Rfc8941.php:120:42: InvalidArgument: Argument 1 of Amp\Http\StructuredFields\InnerList::__construct expects list<Amp\Http\StructuredFields\Item<void>>, but list<Amp\Http\StructuredFields\Item<void>|null> provided (see https://psalm.dev/004)
|
MoreSpecificReturnType:
src/StructuredFields/Rfc8941.php#L134
src/StructuredFields/Rfc8941.php:134:23: MoreSpecificReturnType: The declared return type 'Amp\Http\StructuredFields\Item<void>|null' for Amp\Http\StructuredFields\Rfc8941::parseItemInternal is more specific than the inferred return type 'null|object' (see https://psalm.dev/070)
|
NoValue:
src/StructuredFields/Rfc8941.php#L137
src/StructuredFields/Rfc8941.php:137:22: NoValue: All possible types for this assignment were invalidated - This may be dead code (see https://psalm.dev/179)
|
UndefinedClass:
src/StructuredFields/Rfc8941.php#L143
src/StructuredFields/Rfc8941.php:143:16: UndefinedClass: Type (TOutput is null ? null : class-string<Amp\Http\StructuredFields\Item<void>>) cannot be called as a class (see https://psalm.dev/019)
|
LessSpecificReturnStatement:
src/StructuredFields/Rfc8941.php#L143
src/StructuredFields/Rfc8941.php:143:16: LessSpecificReturnStatement: The type 'object' is more general than the declared return type 'Amp\Http\StructuredFields\Item<void>|null' for Amp\Http\StructuredFields\Rfc8941::parseItemInternal (see https://psalm.dev/129)
|
PHP 8.1 on macOS
The job was canceled because "ubuntu-latest_8_2" failed.
|
PHP 8.1 on macOS
The operation was canceled.
|
PHP 8.1 on Windows
The job was canceled because "ubuntu-latest_8_2" failed.
|
PHP 8.1 on Windows
The operation was canceled.
|
PHP 8.1
The job was canceled because "ubuntu-latest_8_2" failed.
|
MismatchingDocblockPropertyType:
src/StructuredFields/Item.php#L12
src/StructuredFields/Item.php:12:21: MismatchingDocblockPropertyType: Parameter Amp\Http\StructuredFields\Item::$item has wrong type 'null|scalar', should be 'array<array-key, mixed>|scalar' (see https://psalm.dev/264)
|
InvalidReturnType:
src/StructuredFields/Rfc8941.php#L16
src/StructuredFields/Rfc8941.php:16:22: InvalidReturnType: The declared return type 'list<Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>>|null' for Amp\Http\StructuredFields\Rfc8941::parseList is incorrect, got 'list<Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>|null>|null' (see https://psalm.dev/011)
|
InvalidReturnStatement:
src/StructuredFields/Rfc8941.php#L35
src/StructuredFields/Rfc8941.php:35:24: InvalidReturnStatement: The inferred type 'non-empty-list<Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>|null>' does not match the declared return type 'list<Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>>|null' for Amp\Http\StructuredFields\Rfc8941::parseList (see https://psalm.dev/128)
|
InvalidReturnType:
src/StructuredFields/Rfc8941.php#L49
src/StructuredFields/Rfc8941.php:49:22: InvalidReturnType: The declared return type 'array<string, Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>>|null' for Amp\Http\StructuredFields\Rfc8941::parseDictionary is incorrect, got 'array<string, Amp\Http\StructuredFields\Boolean|Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>|null>|null' (see https://psalm.dev/011)
|
InvalidReturnStatement:
src/StructuredFields/Rfc8941.php#L80
src/StructuredFields/Rfc8941.php:80:24: InvalidReturnStatement: The inferred type 'non-empty-array<string, Amp\Http\StructuredFields\Boolean|Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>|null>' does not match the declared return type 'array<string, Amp\Http\StructuredFields\InnerList|Amp\Http\StructuredFields\Item<void>>|null' for Amp\Http\StructuredFields\Rfc8941::parseDictionary (see https://psalm.dev/128)
|
InvalidArgument:
src/StructuredFields/Rfc8941.php#L120
src/StructuredFields/Rfc8941.php:120:42: InvalidArgument: Argument 1 of Amp\Http\StructuredFields\InnerList::__construct expects list<Amp\Http\StructuredFields\Item<void>>, but list<Amp\Http\StructuredFields\Item<void>|null> provided (see https://psalm.dev/004)
|
MoreSpecificReturnType:
src/StructuredFields/Rfc8941.php#L134
src/StructuredFields/Rfc8941.php:134:23: MoreSpecificReturnType: The declared return type 'Amp\Http\StructuredFields\Item<void>|null' for Amp\Http\StructuredFields\Rfc8941::parseItemInternal is more specific than the inferred return type 'null|object' (see https://psalm.dev/070)
|
NoValue:
src/StructuredFields/Rfc8941.php#L137
src/StructuredFields/Rfc8941.php:137:22: NoValue: All possible types for this assignment were invalidated - This may be dead code (see https://psalm.dev/179)
|
UndefinedClass:
src/StructuredFields/Rfc8941.php#L143
src/StructuredFields/Rfc8941.php:143:16: UndefinedClass: Type (TOutput is null ? null : class-string<Amp\Http\StructuredFields\Item<void>>) cannot be called as a class (see https://psalm.dev/019)
|
LessSpecificReturnStatement:
src/StructuredFields/Rfc8941.php#L143
src/StructuredFields/Rfc8941.php:143:16: LessSpecificReturnStatement: The type 'object' is more general than the declared return type 'Amp\Http\StructuredFields\Item<void>|null' for Amp\Http\StructuredFields\Rfc8941::parseItemInternal (see https://psalm.dev/129)
|