Just a short issue to discuss a few style things.
I suggest we vote on these to agree on a certain style that we can all go by, to prevent to-and-fro overwrites of little things.
Following are just a few that have different variants in the codebase at the moment. Most things are already managed thanks to following PSR-2 guidelines, but some things need to be defined by us (or I haven't found the PSR-2 equivalent, in which case let me know please!)
(in these examples, I favour the first suggestions)
(int) $var vs. (int)$varreturn statements: 1 empty line vs. 0 empty lines lastLineOfCode();
return $something;
}
vs.
lastLineOfCode();
return $something;
}
$short = 'short';
$a_bit_longer = 'a_bit_longer';
vs.
$short = 'short';
$a_bit_longer = 'a_bit_longer';
summoning @akalongman @MBoretto @jacklul
I am vote for each, except "Align variable assignments". I think align for arrays is good, but for variables - not.
Ok 馃憤
Initially I would have liked it like that as well and looked for an option in PhpStorm and thought there was only 1 option for both alignments. Now I looked again and found both, one for each setting. So I'm more than happy to have arrays aligned and assignments not.
First and second: first suggestions,
Third: Neutral, I'm fine with not using extra spaces at all unless it improves readability in those lines (DB.php lines 815+)
Most helpful comment
I am vote for each, except "Align variable assignments". I think align for arrays is good, but for variables - not.