Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSR2 violation: Generic.Formatting.DisallowMultipleStatements.SameLine #2

Open
juzna opened this issue Nov 10, 2012 · 0 comments
Open
Labels

Comments

@juzna
Copy link
Owner

juzna commented Nov 10, 2012

  1. Statement + break on the same line. Shall we allow it? Perhaps only in this short case.
// somewhere in Latte
switch ($macro) {
case 'node.word':
    $code = $me->formatWord($word); break;
case 'node.args':
    $code = $me->formatArgs(); break;
  1. one-line closure - I think this may be allowed
// Arrays.php
array_walk_recursive($arr, function($a) use (& $res) { $res[] = $a; });
  1. initialization of multiple vars - dunno if that's good idea
// Neon.php
$obj = $var; $var = array();
// Image.php
$newWidth += $left; $left = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant