html icon indicating copy to clipboard operation
html copied to clipboard

Code style - chain calls

Open arogachev opened this issue 3 years ago • 1 comments

This is confusing:

https://github.com/yiisoft/html/blob/e62c412af927a93df6cfa603bf63d61b1bf19045/tests/common/Tag/Base/TagTest.php#L156-L158

Need to decide whether it's OK:

https://github.com/yiisoft/html/blob/e62c412af927a93df6cfa603bf63d61b1bf19045/tests/common/Tag/Base/TagTest.php#L175

arogachev avatar Jul 08 '22 06:07 arogachev

Either it should be the following:

$this->assertSame(
    $expected,
    (string)TestTag::tag() 
        ->class('main') 
        ->class(...$class)
); 

or inline.

samdark avatar Jul 08 '22 15:07 samdark