Currently there are 2 types of annotations:
- PHPDoc ones (have space after it's name)
- Non-PHPDoc ones (have opening parenthesis after it's name)
Technically ones that don't have opening parenthesis aren't strictly PHPDoc ones, but still.
The problem I'm facing is DocBlock tag (everything that starts with @) indentation due PHP_CodeSniffer validation (see squizlabs/PHP_CodeSniffer#343).
The DocBlock that triggers an error for PHP_CodeSniffer:
/**
* Annotation for describing element selector in Selenium style.
*
* @link http://bit.ly/qa-tools-find-by-annotation
* @usage('class'=>true, 'property'=>true, 'inherited'=>true, 'multiple'=>true)
*/
The proposed DocBlock that won't trigger an error for PHP_CodeSniffer, but will trigger an exception for "php-annotations":
/**
* Annotation for describing element selector in Selenium style.
*
* @link http://bit.ly/qa-tools-find-by-annotation
* @usage ('class'=>true, 'property'=>true, 'inherited'=>true, 'multiple'=>true)
* @internal
*/
Basically what we should allow to do is having variable number of whitespaces after @tagname and opening parenthesis without immediately considering an annotation as PHPDoc one and throwing following exception:
Annotation type 'NoteAnnotation' does not support PHP-DOC style syntax (because it does not implement the mindplay\annotations\IAnnotationParser interface)
Currently there are 2 types of annotations:
Technically ones that don't have opening parenthesis aren't strictly PHPDoc ones, but still.
The problem I'm facing is DocBlock tag (everything that starts with
@) indentation due PHP_CodeSniffer validation (see squizlabs/PHP_CodeSniffer#343).The DocBlock that triggers an error for PHP_CodeSniffer:
The proposed DocBlock that won't trigger an error for PHP_CodeSniffer, but will trigger an exception for "php-annotations":
Basically what we should allow to do is having variable number of whitespaces after
@tagnameand opening parenthesis without immediately considering an annotation as PHPDoc one and throwing following exception: