Review main Merged

75160[BUGFIX] Enhance annotation integrity test script

Stefan Bürk CR +2 V +2 Easy +12 −3 updated 07/13/22, 06:59

Commit message

Docblock annotations with more then one space between a wildcard
character `*` and the annotation start character `@` was not found.
Additionally, annotation identifiers did not regonize hyphens as
valid identifier character, thus cutting of e.g. phpstan annoations.

This patch now properly finds annotions with multi-space separations
and annotation identifiers containing hyphens. Additionally, two
phpstan specific annotations are allowed.

> https://phpstan.org/writing-php-code/phpdoc-types#local-type-aliases

Summarized contained tasks:

> find multi-space separated annotations
  e.g. `*  @<AnnotationIdentifier>`
> properly extract full annotation identifier containing hyphens
  e.g. `* @annoation-identifier-with-hyphen`
> add `@phpstan-type` and `@phpstan-import-type` as allowed
  annotation, but only on class level, and not on class-property
  or class-method level

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 3

Files 1