Skip to content

Conversation

@szepeviktor
Copy link

@szepeviktor szepeviktor commented Apr 16, 2023

Please consider using PHPStan.

If I write It is a superior tool here, there could be flamewars 🔥

return $this->createUnionType(
array_map(
function (ReflectionNamedType|ReflectionIntersectionType $type) use ($reflectionParameter): SimpleType|ClassType|EnumType|ArrayType {
function (ReflectionNamedType|ReflectionIntersectionType $type) use ($reflectionParameter): SimpleType|ClassType|EnumType {
Copy link
Author

Choose a reason for hiding this comment

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

convertNamedType does not return ArrayType

@szepeviktor szepeviktor changed the title Fix Fix problems detected by PHPStan Apr 16, 2023
@szepeviktor szepeviktor marked this pull request as ready for review April 16, 2023 08:11
Comment on lines -151 to +152
/** @var list<array{string}> $matches */
preg_match_all($pattern, $docComment, $matches, PREG_SET_ORDER);
/** @var list<list<string>> $matches */
Copy link
Author

Choose a reason for hiding this comment

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

$match comes into existence after preg_match_all

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant