Skip to content

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

@juzna

Description

@juzna
  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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions