Conflicting indent rules
- [x] I was not able to find an open or closed issue matching what I'm seeing.
- [x] This is not a question. (Questions should be asked on chat (Signup here) or our forums.)
It seems there are two conflicting indent rules.
Code to reproduce the issue
Variant 1
$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.
Variant 2
$routes->connect('/test/:test', 'Test::test', [
'_name' => 'test',
'_method' => ['GET', 'POST'],
])
->setPass(['test']);
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
$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']);
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.
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.