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: unused imports and generics #44

Merged
merged 1 commit into from Oct 24, 2020
Merged

fix: unused imports and generics #44

merged 1 commit into from Oct 24, 2020

Conversation

geerteltink
Copy link
Member

@geerteltink geerteltink commented Oct 24, 2020

Adds support for psalm-var and genercis in docblock:

  • @psalm-var IteratorAggregate
  • @var IteratorAggregate<string,string>
  • @param IteratorAggregate<string,string> $config

As a positive side effect, this also detects missing native return types like void and can fix these automatically.
Propert type hint is switched of as PHP 7.3 must still be supported.

Fixes #23

Adds support for psalm-var and genercis in docblock:

- @psalm-var IteratorAggregate
- @var IteratorAggregate<string,string>
- @param IteratorAggregate<string,string> $config

Fixes #23

Signed-off-by: Geert Eltink <geert.eltink@gmail.com>
@geerteltink geerteltink added the Bug Something isn't working label Oct 24, 2020
@geerteltink geerteltink added this to the 2.1.1 milestone Oct 24, 2020
@geerteltink geerteltink self-assigned this Oct 24, 2020
@geerteltink
Copy link
Member Author

geerteltink commented Oct 24, 2020

@boesing can you please review and check if this would fix the issues you found in mezzio/mezzio-authentication#8.

I've added 9.GenericTypeHintSyntax.php for checking generics and @psalm-var.

@geerteltink geerteltink linked an issue Oct 24, 2020 that may be closed by this pull request
Copy link
Member

@boesing boesing left a comment

Choose a reason for hiding this comment

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

Looks good. I've removed the exclusions from mezzio/mezzio-authentication and re-run checks.
Works as expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support generic type hint syntax
2 participants