$ php -v):=> PHP 7.2.11
$ php-cs-fixer -V):=> PHP CS Fixer 2.13.0
=> php-cs-fixer fix --rules visibility_required -- Test.php
no config
<?php
declare(strict_types=1);
class Test
{
private /* comment */ $private = 'private';
};
<?php
declare(strict_types=1);
class Test
{
private $private = 'private';
};
btw, what is the purpose of such comment ?
This was a comment to disable an inspector warning in the IDE.
PHPStorm will only accept this if it is written in this place.
private /** @noinspection PhpUnusedPrivateFieldInspection */ $private = 'private';
I do not need this comment, but I figured it would be right to report the bug that this fixer removes comments.
Most helpful comment
This was a comment to disable an inspector warning in the IDE.
PHPStorm will only accept this if it is written in this place.
I do not need this comment, but I figured it would be right to report the bug that this fixer removes comments.