PSR-12 and method chaining

1.4k views Asked by At

Does PSR-12 establish any kind of restriction with method chaining? Are both options below equally valid according to the standard?

Option 1:

$object->methodA()->methodB()->methodC()->methodD();

Option 2:

$object->methodA()
    ->methodB()
    ->methodC()
    ->methodD();
0

There are 0 answers