| @@ 409-416 (lines=8) @@ | ||
| 406 | */ |
|
| 407 | private function registerFunction($tokenID) |
|
| 408 | { |
|
| 409 | foreach ($this->declarations as $declarations) { |
|
| 410 | foreach ($declarations as $location) { |
|
| 411 | if ($tokenID >= $location[self::O_TOKEN] && $tokenID <= $location[self::C_TOKEN]) { |
|
| 412 | //We are inside class, function is method |
|
| 413 | return; |
|
| 414 | } |
|
| 415 | } |
|
| 416 | } |
|
| 417 | ||
| 418 | $localID = $tokenID + 1; |
|
| 419 | while ($this->tokens[$localID][self::TOKEN_TYPE] != T_STRING) { |
|
| @@ 659-665 (lines=7) @@ | ||
| 656 | */ |
|
| 657 | private function activeDeclaration($tokenID) |
|
| 658 | { |
|
| 659 | foreach ($this->declarations as $declarations) { |
|
| 660 | foreach ($declarations as $name => $position) { |
|
| 661 | if ($tokenID >= $position[self::O_TOKEN] && $tokenID <= $position[self::C_TOKEN]) { |
|
| 662 | return $name; |
|
| 663 | } |
|
| 664 | } |
|
| 665 | } |
|
| 666 | ||
| 667 | //Can not be detected |
|
| 668 | return null; |
|