Skip to content

Commit 18d2081

Browse files
committed
Changelog + unit tests for PR #1011
1 parent f41318b commit 18d2081

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

CodeSniffer/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ switch ($var) {
134134
}
135135

136136
defined('FOO') or die('error');
137+
defined('FOO') || die('error');
137138
interface myInterface {
138139
function myFunc();
139140
}

CodeSniffer/Standards/Squiz/Tests/PHP/NonExecutableCodeUnitTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ public function getWarningList()
7676
95 => 1,
7777
105 => 1,
7878
123 => 1,
79-
146 => 1,
80-
149 => 1,
81-
152 => 1,
82-
165 => 1,
83-
179 => 1,
84-
221 => 1,
79+
147 => 1,
80+
150 => 1,
81+
153 => 1,
82+
166 => 1,
83+
180 => 1,
8584
222 => 1,
8685
223 => 1,
87-
224 => 2,
88-
228 => 1,
86+
224 => 1,
87+
225 => 2,
88+
229 => 1,
8989
);
9090

9191
}//end getWarningList()

package.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ http://pear.php.net/dtd/package-2.0.xsd">
4646
- Fixed bug #973 : Anonymous class declaration and PSR1.Files.SideEffects.FoundWithSymbols
4747
- Fixed bug #974 : Error when file ends with "function"
4848
- Fixed bug #979 : Anonymous function with return type hint is not refactored as expected
49-
- Fixed bug #893 : Squiz.WhiteSpace.MemberVarSpacing.AfterComment fails to fix error when comment is not a docblock
49+
- Fixed bug #983 : Squiz.WhiteSpace.MemberVarSpacing.AfterComment fails to fix error when comment is not a docblock
50+
- Fixed bug #1010 : Squiz NonExectuableCode sniff does not detect boolean OR
51+
-- Thanks to Derek Henderson for the patch
5052
</notes>
5153
<contents>
5254
<dir name="/">

0 commit comments

Comments
 (0)