Skip to content
This repository
Browse code

Replacing array_key_exists with isset() for performance improvements.

  • Loading branch information...
commit 436cccfbb46304aaf0c5aee1812d505beea700c4 1 parent d4a21a1
Michael Nitschinger daschl authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  test/rules/IncludeAndRequireWithoutBrackets.php
2  test/rules/IncludeAndRequireWithoutBrackets.php
@@ -21,7 +21,7 @@ public function apply($testable) {
21 21 $tokens = $testable->tokens();
22 22
23 23 foreach ($tokens as $key => $token) {
24   - if(array_key_exists($token['name'], $this->_inspectableTokens)) {
  24 + if(isset($this->_inspectableTokens[$token['name']])) {
25 25 for ($i = 1; $i <= 2; $i++) {
26 26 if ($tokens[$key+$i]['name'] == 'T_WHITESPACE') {
27 27 continue;

1 comment on commit 436cccf

Michael Nitschinger
Collaborator

Down to 40.

Please sign in to comment.
Something went wrong with that request. Please try again.