Closed
Description
With the following code:
<?php
namespace App\Nova;
class Song
{
public function fields(Request $request): array
{
return [
Url::make('View Song', fn($song) => $song->url())
->onlyOnDetail(),
new Panel('Information', [
Text::make('Title')
]),
];
}
}
I get this output:
phpcs -s test.php --standard=PSR12
FILE: /Users/adriaan/test.php
----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------
15 | ERROR | [x] Line indented incorrectly; expected at least 16 spaces, found 12
| | (Generic.WhiteSpace.ScopeIndent.Incorrect)
----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------
Time: 53ms; Memory: 6MB
When I remove the method call after the arrow function (->onlyOnDetail()
), the error goes away.