Php-cs-fixer: phpdoc_annotation_without_dot does not override @Symfony

Created on 15 May 2018  Â·  3Comments  Â·  Source: FriendsOfPHP/PHP-CS-Fixer

PHP 7.2.3-1ubuntu1
PHP CS Fixer 2.10.3

Configuration:

<?php
return PhpCsFixer\Config::create()
    ->setRiskyAllowed(true) 
    ->setRules([
         '@Symfony' => true,
         'phpdoc_annotation_without_dot' => true
    ])

code snipped before PHP-CS-Fixer

class devtest extends Controller
{
    /**
     * show asset overview
     *
     * @var OtherClass
     *
     * @param Request $request
     *
     * @return \Symfony\Component\HttpFoundation\Response
     */

code snipped after PHP-CS-Fixer

class devtest extends Controller
{
    /**
     * show asset overview.
     *
     * @var OtherClass
     *
     * @param Request $request
     *
     * @return \Symfony\Component\HttpFoundation\Response
     */
kinquestion

Most helpful comment

That fixer does something else than what you are looking for, I believe you are actually looking for:

<?php

return PhpCsFixer\Config::create()
    ->setRiskyAllowed(true) 
    ->setRules([
         '@Symfony' => true,
         'phpdoc_summary' => false,
    ]);

All 3 comments

That fixer does something else than what you are looking for, I believe you are actually looking for:

<?php

return PhpCsFixer\Config::create()
    ->setRiskyAllowed(true) 
    ->setRules([
         '@Symfony' => true,
         'phpdoc_summary' => false,
    ]);

Exactly, phpdoc_annotation_without_dot is about annotations inside docs, not summary

Thanks a lot :-)
'phpdoc_summary' => false works

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kcloze picture kcloze  Â·  3Comments

vitek-rostislav picture vitek-rostislav  Â·  3Comments

amitbisht511 picture amitbisht511  Â·  3Comments

Bilge picture Bilge  Â·  3Comments

ro0NL picture ro0NL  Â·  3Comments