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

BackEndTea picture BackEndTea  路  3Comments

EvgenyOrekhov picture EvgenyOrekhov  路  3Comments

aidantwoods picture aidantwoods  路  3Comments

Bilge picture Bilge  路  3Comments

carusogabriel picture carusogabriel  路  3Comments