Skip to content

Commit b11d7bf

Browse files
committed
fixed tname() callsites.
1 parent 3ba204f commit b11d7bf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/CodeCoverage/Util/Tokenizer.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ private function getEndLine(array $tokens, $idx)
323323
private function getPackage(array $tokens, $idx)
324324
{
325325
$token = $tokens[$idx];
326-
$className = $this->tname($token);
326+
$className = $this->tname($tokens, $idx);
327327
$docComment = $this->getDocblock($tokens, $idx);
328328

329329
$result = array(
@@ -337,7 +337,7 @@ private function getPackage(array $tokens, $idx)
337337
for ($i = $idx; $i; --$i) {
338338
$tconst = $this->tconst($tokens[$i]);
339339
if ($tconst === T_NAMESPACE) {
340-
$result['namespace'] = $this->tname($tokens[$i]);
340+
$result['namespace'] = $this->tname($tokens, $i);
341341
break;
342342
}
343343
}
@@ -384,8 +384,7 @@ private function arrayToName(array $parts, $join = '\\')
384384
*/
385385
private function getSignature(array $tokens, $idx)
386386
{
387-
$token = $tokens[$idx];
388-
if ($this->tname($token) == 'anonymous function') {
387+
if ($this->tname($tokens, $idx) == 'anonymous function') {
389388
$signature = 'anonymous function';
390389
$i = $idx + 1;
391390
} else {

0 commit comments

Comments
 (0)