symplify / coding-standard

Coding Standard rules for PHP projects with focus on Clean Architecture
MIT License
347 stars 20 forks source link

[BUG] LineLengthFixer: incorrectly takes phpdoc length into account #22

Open Ciki opened 1 year ago

Ciki commented 1 year ago
<?php

declare(strict_types=1);

class TestClass
{

    /**
     * This is just standard doc comment for method which declaration's length is actually <  LineLengthFixer max length
     * but it computes this php doc to the method declaration itself
     */
    private function testMethod($arg)
    {

    }
}
?>

when LineLengthFixer is called on this file, it breaks the line and outputs this

image

I don't know how to fix it, however