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

PhpdocNoEmptyReturnFixer is too greedy #3869

Closed
dmvdbrugge opened this issue Jul 5, 2018 · 1 comment
Closed

PhpdocNoEmptyReturnFixer is too greedy #3869

dmvdbrugge opened this issue Jul 5, 2018 · 1 comment

Comments

@dmvdbrugge
Copy link
Contributor

The PHP version you are using ($ php -v):

PHP 7.1.18 (cli) (built: May 25 2018 19:18:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.18, Copyright (c) 1999-2018, by Zend Technologies

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, and no_unset_on_property

If applicable, please provide minimum samples of PHP code (as plain text, not screenshots):

  • before running PHP CS Fixer (no changes):
/**
 * @return string[]|NULL[].
 */
  • after first run:
/**
 * @return NULL[]|string[]
 */
  • after second run:
  • expected:
/**
 * @return string[]|null[]
 */

Meta: this is case 48 of #3844

@dmvdbrugge
Copy link
Contributor Author

Picking up this one now.

dmvdbrugge added a commit to dmvdbrugge/PHP-CS-Fixer that referenced this issue Jul 9, 2018
dmvdbrugge added a commit to dmvdbrugge/PHP-CS-Fixer that referenced this issue Jul 9, 2018
dmvdbrugge added a commit to dmvdbrugge/PHP-CS-Fixer that referenced this issue Jul 9, 2018
keradus added a commit that referenced this issue Aug 19, 2018
This PR was merged into the 2.12 branch.

Discussion
----------

PhpdocNoEmptyReturnFixer - account for null[]

This fixes #3869

Commits
-------

23084e9 PhpdocNoEmptyReturnFixer - account for null[]
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

No branches or pull requests

1 participant