Skip to content

Commit 148bb42

Browse files
photodudewilsonge
authored andcommitted
Fix Implicit true comparison (#244)
best practice to always avoid Implicit true comparisons (also mandated by PHPCS when contributing to their Repo)
1 parent f49b686 commit 148bb42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Joomla/Sniffs/ControlStructures/ControlStructuresBracketsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
179179
* Take into account any nested parenthesis that don't contribute to the level (often required for
180180
* closures and anonymous classes
181181
*/
182-
if (array_key_exists('nested_parenthesis', $tokens[$stackPtr]))
182+
if (array_key_exists('nested_parenthesis', $tokens[$stackPtr]) === true)
183183
{
184184
$nested = count($tokens[$stackPtr]['nested_parenthesis']);
185185
}

0 commit comments

Comments
 (0)