Open PatrickG opened 5 years ago
It seems there are two conflicting indent rules.
$routes->connect('/test/:test', 'Test::test', [ '_name' => 'test', '_method' => ['GET', 'POST'], ]) ->setPass(['test']);
Shows an error for line 2-4: Invalid indent. Expected 12 spaces, found 8. phpcbf corrects this to variant 2.
Invalid indent. Expected 12 spaces, found 8
Shows an error for line 2-4: Array key not indented correctly; expected 8 spaces but found 12. phpcbf corrects this to variant 1.
Array key not indented correctly; expected 8 spaces but found 12
$routes->connect( '/test/:test', 'Test::test', [ '_name' => 'test', '_method' => ['GET', 'POST'], ] ) ->setPass(['test']);
$routes ->connect( '/test/:test', 'Test::test', [ '_name' => 'test', '_method' => ['GET', 'POST'], ] ) ->setPass(['test']);
$routes ->connect('/test/:test', 'Test::test', [ '_name' => 'test', '_method' => ['GET', 'POST'], ]) ->setPass(['test']);
One of the variants should show no error, or phpcbf should correct both variants to a variant that shows no error.
Both variants show an error, and phpcbf corrects them in a loop.
Which version are you using?
2.0.x-dev
This repository has been closed and moved to laminas/laminas-coding-standard; a new issue has been opened at https://github.com/laminas/laminas-coding-standard/issues/2.
It seems there are two conflicting indent rules.
Code to reproduce the issue
Variant 1
Shows an error for line 2-4:
Invalid indent. Expected 12 spaces, found 8
. phpcbf corrects this to variant 2.Variant 2
Shows an error for line 2-4:
Array key not indented correctly; expected 8 spaces but found 12
. phpcbf corrects this to variant 1.Variants that show no errors
Expected results
One of the variants should show no error, or phpcbf should correct both variants to a variant that shows no error.
Actual results
Both variants show an error, and phpcbf corrects them in a loop.