Skip to content

Commit

Permalink
misc: improve return type signature for TreeMapper
Browse files Browse the repository at this point in the history
In situation when `$signature` is just type of class-string without
exact class, return type expected by phpstan is mixin. With this change,
static analysis tools will expect return type object.

Bit more context here phpstan/phpstan#8443
  • Loading branch information
vvoody- authored Dec 1, 2022
1 parent 58d5401 commit c8f3621
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mapper/TreeMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface TreeMapper
* @return (
* $signature is class-string<T>
* ? T
* : mixed
* : ($signature is class-string ? object : mixed)
* )
*
* @throws MappingError
Expand Down

0 comments on commit c8f3621

Please sign in to comment.