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

Feature: property type declaration support (PHP 7.4+) #58

Merged
merged 6 commits into from
Nov 13, 2019

Commits on Nov 13, 2019

  1. Feature: property type declaration support (PHP 7.4+)

    As of PHP 7.4 we can declare property type.
    Add support for property types in the following sniff:
    - `Commenting\PropertyAnnotation` - ensure that type is skipped when
      detecting the comment before property
    - `Commenting\VariableComment` - add multiple checks to ensure type
      declaration is consistent with type provided in PHPDoc (`@var` tag).
      In case type declaration is provided and PHPDoc does not contain any
      additional information, `@var` tag can be omitted.
    michalbundyra committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    68e7816 View commit details
    Browse the repository at this point in the history
  2. Changed assigning variables after preg_split

    Description might not be set and preg_split result will just have one
    value if there is comment closing tag after the tag content
    michalbundyra committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    599fa37 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a4f658b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    72ce4d7 View commit details
    Browse the repository at this point in the history
  5. Fixing issues in Commenting\VariableComment sniff

    On fixing we add the description back only when it was set.
    It could be an empty string, so we need then add just a space
    - so we have one space before closing comment tag.
    michalbundyra committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    244aee1 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    41cc9e3 View commit details
    Browse the repository at this point in the history