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
(Priority?) issue with phpdoc_annotation_without_dot (and whitespace) #3857
Comments
I would prefer the |
At the moment, the fixer doesn't even find that dot because it just looks at the last character of the line. It should account for possible whitespace at the end as well, but the removal of the whitespace is imho the responsibility of As long as |
TBH I rarely use the rule because it doesn't always make sense. PSR5 makes the assumption that all PHPDocs are written in left-to-right languages. Patching the |
I have a different case: /**
* This is a broken phpdoc
*
* @param string $str The next line has no *.
* @return int The number of runs needed to fix this is 2 :( .
*/
function fixMe($str); The first run, @kubawerlos is this perhaps fixed in your PR as well, or do we need another issue for this? |
this is a true priority issue between the fixers, |
I get that the dot-fixer should not add the |
if the |
Yes that's what I said 😉 I shall create a new priority issue. |
…es (kubawerlos) This PR was squashed before being merged into the 2.12 branch (closes #3867). Discussion ---------- PhpdocAnnotationWithoutDotFixer - Handle trailing whitespaces Solves #3857 - I guess @SpacePossum will have some more fancy test cases. Commits ------- 3897460 PhpdocAnnotationWithoutDotFixer - Handle trailing whitespaces
…mment (kubawerlos) This PR was merged into the 2.12 branch. Discussion ---------- PhpdocAnnotationWithoutDotFixer - Handle empty line in comment Solves #3857 (comment) - yet, feels too easy - I'm pessimistic about this one - can we easily trick it? @SpacePossum @dmvdbrugge what do you think? Commits ------- 14190a4 PhpdocAnnotationWithoutDotFixer - Handle empty line in comment
I think this issue itself is fixed in #3867 . The other one has its own issue. |
This is either a priority issue, where
no_trailing_whitespace_in_comment
needs to run beforephpdoc_annotation_without_dot
, or the latter should take whitespace into account.The PHP version you are using (
$ php -v
):PHP CS Fixer version you are using (
$ php-cs-fixer -V
):PHP CS Fixer 2.12.1 Long Journey by Fabien Potencier and Dariusz Ruminski
The command you use to run PHP CS Fixer:
vendor/bin/php-cs-fixer fix -v --using-cache=no
The configuration file you are using, if any:
Basically the same as dmvdbrugge/dynamic-components, except
explicit_string_variable
,header_comment
,no_alternative_syntax
, andno_unset_on_property
If applicable, please provide minimum samples of PHP code (as plain text, not screenshots):
Immediately arrive at the last step
Meta: this is case 13 of #3844
The text was updated successfully, but these errors were encountered: