Skip to content

Commit 6944778

Browse files
committed
made sure local $name variable doesnt collide with token-name
1 parent 4312b85 commit 6944778

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/CodeCoverage/Util/Tokenizer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public function tokenize() {
291291
break;
292292

293293
case 'PHP_Token_FUNCTION':
294-
$name = $this->tname($tokens, $idx);
294+
$tname = $this->tname($tokens, $idx);
295295
$tmp = array(
296296
'docblock' => $token->getDocblock(),
297297
'keywords' => $this->getKeywords($tokens, $i),
@@ -304,13 +304,13 @@ public function tokenize() {
304304
);
305305

306306
if ($class === false && $trait === false && $interface === false) {
307-
$this->functions[$name] = $tmp;
307+
$this->functions[$tname] = $tmp;
308308
} elseif ($class !== false) {
309-
$this->classes[$class]['methods'][$name] = $tmp;
309+
$this->classes[$class]['methods'][$tname] = $tmp;
310310
} elseif ($trait !== false) {
311-
$this->traits[$trait]['methods'][$name] = $tmp;
311+
$this->traits[$trait]['methods'][$tname] = $tmp;
312312
} else {
313-
$this->interfaces[$interface]['methods'][$name] = $tmp;
313+
$this->interfaces[$interface]['methods'][$tname] = $tmp;
314314
}
315315
break;
316316

0 commit comments

Comments
 (0)