3

I have installed php-cs-fixer & using with vim plugin https://github.com/stephpy/vim-php-cs-fixer. I am using custom config file from https://github.com/laravel/framework/blob/5.4/.php_cs. But I am having this issue where extra space after @param from comment block gets deleted.

How can I fix this? Thanks for in advance.

Laravel uses PSR2 coding standard.

From laravel.com about documentation - Note that the @param attribute is followed by two spaces, the argument type, two more spaces, and finally the variable name:

/**
 * Register a binding with the container.
 *
 * @param  string|array  $abstract
 * @param  \Closure|string|null  $concrete
 * @param  bool  $shared
 * @return void
 */
public function bind($abstract, $concrete = null, $shared = false)
{
    //
}

Thanks.

Ganesh
  • 3,128
  • 2
  • 17
  • 27

1 Answers1

0

You are probably looking for "phpdoc_align" fixer. See docs:

enter image description here

Laravel uses many more from Symfony standard (marked by "@Symfony").

But the best way to find all fixers for Laravel, would be in PHP-CS-Fixer configuration in Laravel repostiory.

Tomas Votruba
  • 23,240
  • 9
  • 79
  • 115