Skip to content

[TypeDeclaration] Ensure ArrayType on ReturnTypeFromStrictNewArrayRector::shouldAddReturnArrayDocType()#4932

Merged
samsonasik merged 1 commit intomainfrom
ensure-array
Sep 7, 2023
Merged

[TypeDeclaration] Ensure ArrayType on ReturnTypeFromStrictNewArrayRector::shouldAddReturnArrayDocType()#4932
samsonasik merged 1 commit intomainfrom
ensure-array

Conversation

@samsonasik
Copy link
Copy Markdown
Member

Avoid error on unioned array:

         "System error:                                                                                                 
         "Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNewArrayRector::shouldAddReturnArrayDocType():  
         Argument #1 ($arrayType) must be of type PHPStan\Type\ArrayType, PHPStan\Type\UnionType given,

@samsonasik samsonasik enabled auto-merge (squash) September 7, 2023 04:39
@samsonasik samsonasik merged commit eebc3ce into main Sep 7, 2023
@samsonasik samsonasik deleted the ensure-array branch September 7, 2023 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant