Skip to content
Snippets Groups Projects
Commit 16d49edd authored by Klaus Purer's avatar Klaus Purer
Browse files

feat(DisallowMultipleStatements): Add sniff to detect multiple ;; statements...

feat(DisallowMultipleStatements): Add sniff to detect multiple ;; statements on one line (#3029175 by klausi)
parent a05b9d08
No related branches found
No related tags found
No related merge requests found
......@@ -46,6 +46,7 @@
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
<rule ref="Generic.Files.ByteOrderMark" />
<rule ref="Generic.Formatting.DisallowMultipleStatements" />
<rule ref="Generic.Formatting.SpaceAfterCast" />
<rule ref="Generic.Functions.FunctionCallArgumentSpacing" />
......
......@@ -57,7 +57,7 @@ function example_custom_block_view($delta = '') {
switch ($delta) {
case 'my_block':
// $block['subject'] = t('custom twitter feed');
$block['content'] = test();;
$block['content'] = test();
break;
}
return $block;
......
......@@ -56,7 +56,7 @@ function example_custom_block_view($delta = '') {
switch ($delta) {
case 'my_block':
// $block['subject'] = t('custom twitter feed');
$block['content'] = test();;
$block['content'] = test();
break;
}
return $block;
......
......@@ -375,7 +375,8 @@ class BadUnitTest extends CoderSniffUnitTest
820 => 1,
827 => 1,
829 => 1,
835 => 2,
836 => 1,
838 => 2,
];
}//end switch
......
......@@ -832,4 +832,7 @@ function test28() {
}
// Multiple statements on one line are not allowed.
echo 'Hi!';;
?>
\ No newline at end of file
......@@ -878,3 +878,7 @@ t("");
function test28() {
}
// Multiple statements on one line are not allowed.
echo 'Hi!';
;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment