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

Support @extends, @implements, @uses #31

Merged
merged 1 commit into from
Jul 16, 2019

Conversation

arnaud-lb
Copy link
Contributor

This adds support for the @extends, @implements, @uses tags. These tags can be used on a class-like to give type information about existing inheritance, implementations, or trait uses.

  • @extends: Denotes that the class extends the given class with the given parameterized types
  • @implements: Denotes that the class implements the given interface with the given parameterized types
  • @uses: Denotes that the class uses the given trait with the given parameterized types

Grammar:

'@' ('extends' | 'implements' | 'uses') identifier '<' type (',' type)* '>'

Example:

<?php

/**
 * @template K
 * @template V
 *
 * @implements Collection<K,V>
 */
class Foo implements Collection {
}

@ondrejmirtes ondrejmirtes merged commit 14346cb into phpstan:master Jul 16, 2019
@ondrejmirtes
Copy link
Member

Thank you! 🙌

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.

2 participants