phpphp-cs-fixer

Disable 'phpdoc_var_without_name' option phpcsfixer


How can I disable this option from phpcsfixer? I want to use :

   /**
    * @var ObjectType $object
    */

But not,

/**@var ObjectType $type*/

But phpcsfixer will remove the variable name in the first case


Solution

  • Simply add

    'phpdoc_var_without_name' => false
    

    to your config.