Both are valid, PSR2
compliant, constructs. You can test both (bash) statements with phpcs
:
you@server ~ $ phpcs --standard=PSR2 <<EOF
return new JsonModel(array(
'success' => true,
'data' => $someData,
));
EOF
and:
you@server ~ $ phpcs --standard=PSR2 <<EOF
return new JsonModel(
array(
'success' => true,
'data' => $someData,
)
);
EOF
Btw, I've used:
PHP_CodeSniffer version 1.5.1 (stable) by Squiz (http://www.squiz.net)