-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Describe the bug
A clear and concise description of what the bug is.
Code sample
<?php
$overrides = [
'abcd1234' => [ // name
'title' => function ($product) {
return trim(substr($product['title'], 0, 100));
}
],
'abcd1255' => [ //company - Remove '2019/19' from the beginning of their title
'title' => fn ($product) => trim(preg_replace('/^[0-9\/]{4,7}/', '', $product['title']))
],
'abcd9982' => [ // another company
'type' => 'Product Delivery', // Product Delivery
]
];To reproduce
Steps to reproduce the behavior:
- Create a file called
test.phpwith the code sample above... - Run
phpcs --standard=Generic --sniffs=Generic.WhiteSpace.ScopeIndent test.php - See error message displayed
---------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------
14 | ERROR | [x] Line indented incorrectly; expected at least 8 spaces, found 4
---------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------
Expected behavior
no error - spaces = 4 should be correct?
Versions (please complete the following information):
- OS: Ubunutu 18.04
- PHP: 7.4.16
- PHPCS: 3.6