-1

Using Laravel, my kernel file has my $routeMiddleware property array as normal.

protected $routeMiddleware = [
  'access' => \App\Middleware\AllowAccess::class,
  'auth' => \App\Middleware\Authenticate::class,
  ...

is being changed to this run I run fixer:

protected $routeMiddleware = [
  'access'         => \App\Middleware\AllowAccess::class,
  'auth'             => \App\Middleware\Authenticate::class,
  ...

My fixer rule set looks like so:

$config->setRules([
  '@PSR2' => true,
  'array_syntax' => ['syntax' => 'short'],
  'ordered_imports' => ['sort_algorithm' => 'length'],
  'no_unused_imports' => true,
])
->setIndent("\t")
->setFinder($finder);

What rule can I add to fix this?

Progman
  • 16,827
  • 6
  • 33
  • 48
secondman
  • 3,233
  • 6
  • 43
  • 66

1 Answers1

0

I've found interesting rules about arrays here.

May you try some of them and tell me if it matches your issue ?

    'no_multiline_whitespace_around_double_arrow' => true,
    'trim_array_spaces'                   => true,
    'object_operator_without_whitespace'  => true,
Philippe
  • 1,134
  • 12
  • 22