>
> Argument lists MAY be split across multiple lines, where each subsequent 
> line is indented once. When doing so, the first item in the list MUST be on 
> the next line, and there MUST be only one argument per line.
>

I ran into a piece of code the other day, that looked like this


*Example 1:*
$foo->bar(
   $arg1, $arg2
);

I argued that this breaks with PSR-2. Some people disagreed.

My argument is that once the break occurs after the first parentheses 
`bar(`, the MAY clause is triggered and subsequent arguments MUST be on a 
new line.

Other people argued that the MAY clause only triggers if there is a break 
after the *first argument*, making *Example 1 *valid

In my opinion, once a break occurs after `bar(`, the only valid PSR-2 of 
*Example 
1 *would be the below *Example 2:*

*Example 2:*
$foo->bar(
    $arg1,
    $arg2
);

*Thoughts?*


-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/0d92644c-2573-49bb-9bb5-8e052a18c3ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to