$ php -v):7.2.15
$ php-cs-fixer -V):2.14.1
php-cs-fixer fix --dry-run src/ -vvv
https://github.com/msgphp/msgphp/blob/master/.php_cs.dist
Files that were not fixed due to errors reported during linting after fixing:
1) /app/src/Eav/Tests/Entity/Fields/AttributeFieldTest.php
[PhpCsFixer\Linter\LintingException]
PHP Parse error: syntax error, unexpected '=' on line 38.
Applied fixers: php_unit_test_case_static_method_calls
See https://travis-ci.org/msgphp/msgphp/jobs/492145928#L198 for error during build.
I thought it was related to #4285, and as such fixed by #4286. But it seems this is not the case :(
Hi and thanks for reporting.
After checking I think the issues are with the PhpUnitTestCaseStaticMethodCallsFixer.
I see the fixer:
$this->attribute = 1;)Seen on both 2.12 and 2.14
minimal sample:
<?php
final class MyTest extends TestCase
{
private function foo()
{
$this->attribute = 1;
return new class {
public function __construct()
{
$this->attribute = 1;
}
};
}
}
@SpacePossum take a look at PR mentioned above ;)
: D
I had this issue open for so long, I never saw the PR reference since I didn't reload the page :man_facepalming:
Most helpful comment
: D
I had this issue open for so long, I never saw the PR reference since I didn't reload the page :man_facepalming: