Skip to content

Do not cast null to array#463

Merged
greg0ire merged 1 commit intodoctrine:1.14.xfrom
greg0ire:dont-cast-null
Dec 12, 2022
Merged

Do not cast null to array#463
greg0ire merged 1 commit intodoctrine:1.14.xfrom
greg0ire:dont-cast-null

Conversation

@greg0ire
Copy link
Member

The possibility that null could be returned was overlooked in 2286f7b .

Fixes #462

derrabus
derrabus previously approved these changes Dec 12, 2022
The possibility that null could be returned was overlooked in
2286f7b .
# That tag is empty on purpose
- '#PHPDoc tag @var has invalid value \(\)\: Unexpected token "\*/", expected type at offset 9#'
# Backwards-compatibility
- '#^Return type.*of method.*DocLexer::peek.*should be compatible.*$#'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phpstan warned me 🙈

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the parent type returns array, so it should not be happy with this 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah Phpstan is only at level 3 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[1.13.3 to 1.14.0] Undefined array key "type"

2 participants

Comments