Permalink
Browse files

Replacing array_key_exists with isset() for performance improvements.

  • Loading branch information...
1 parent d4a21a1 commit 436cccfbb46304aaf0c5aee1812d505beea700c4 @daschl daschl committed Jul 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 test/rules/IncludeAndRequireWithoutBrackets.php
@@ -21,7 +21,7 @@ public function apply($testable) {
$tokens = $testable->tokens();
foreach ($tokens as $key => $token) {
- if(array_key_exists($token['name'], $this->_inspectableTokens)) {
+ if(isset($this->_inspectableTokens[$token['name']])) {
for ($i = 1; $i <= 2; $i++) {
if ($tokens[$key+$i]['name'] == 'T_WHITESPACE') {
continue;

1 comment on commit 436cccf

Member

daschl commented on 436cccf Jul 29, 2012

Down to 40.

Please sign in to comment.