Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed bug #19727 : PSR2: no error reported when using } elseif {

  • Loading branch information...
commit 43313f3d752babaaf4b7347a1f7cefb84c46a871 1 parent 2fc7017
@gsherwood gsherwood authored
View
1  CodeSniffer/Standards/Squiz/Sniffs/ControlStructures/ControlSignatureSniff.php
@@ -58,6 +58,7 @@ protected function getPatterns()
'if (...) {EOL',
'foreach (...) {EOL',
'} else if (...) {EOL',
+ '} elseif (...) {EOL',
'} else {EOL',
);
View
8 CodeSniffer/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.inc
@@ -152,4 +152,10 @@ try { $code = 'this'; } catch (Exception $e) {
do { echo $i;
} while ($i > 0);
-?>
+if ($a) {
+
+}
+elseif ($b) {
+
+}
+?>
View
1  CodeSniffer/Standards/Squiz/Tests/ControlStructures/ControlSignatureUnitTest.php
@@ -72,6 +72,7 @@ public function getErrorList($testFile='ControlSignatureUnitTest.inc')
139 => 1,
148 => 1,
152 => 1,
+ 158 => 1,
);
break;
case 'ControlSignatureUnitTest.js':
View
1  package.xml
@@ -38,6 +38,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
-- Thanks to Andy Grunwald for the patch
- Fixed bug #19699 : Generic.Files.LineLength giving false positives when tab-width is used
- Fixed bug #19726 : Wrong number of spaces expected after instanceof static
+ - Fixed bug #19727 : PSR2: no error reported when using } elseif {
</notes>
<contents>
<dir name="/">
Please sign in to comment.
Something went wrong with that request. Please try again.