Skip to content

Commit

Permalink
Fix Implicit true comparison (#244)
Browse files Browse the repository at this point in the history
best practice to always avoid Implicit true comparisons (also mandated by PHPCS when contributing to their Repo)
  • Loading branch information
photodude authored and wilsonge committed Mar 24, 2019
1 parent f49b686 commit 148bb42
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
* Take into account any nested parenthesis that don't contribute to the level (often required for
* closures and anonymous classes
*/
if (array_key_exists('nested_parenthesis', $tokens[$stackPtr]))
if (array_key_exists('nested_parenthesis', $tokens[$stackPtr]) === true)
{
$nested = count($tokens[$stackPtr]['nested_parenthesis']);
}
Expand Down

0 comments on commit 148bb42

Please sign in to comment.