Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problems detected by PHPStan #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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 🔥

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