|
@@ 536-578 (lines=43) @@
|
| 533 |
|
/** |
| 534 |
|
* @param PHP_Token_Stream $tokens |
| 535 |
|
*/ |
| 536 |
|
protected function processClasses(PHP_Token_Stream $tokens) |
| 537 |
|
{ |
| 538 |
|
$classes = $tokens->getClasses(); |
| 539 |
|
unset($tokens); |
| 540 |
|
|
| 541 |
|
$link = $this->getId() . '.html#'; |
| 542 |
|
|
| 543 |
|
foreach ($classes as $className => $class) { |
| 544 |
|
$this->classes[$className] = array( |
| 545 |
|
'className' => $className, |
| 546 |
|
'methods' => array(), |
| 547 |
|
'startLine' => $class['startLine'], |
| 548 |
|
'executableLines' => 0, |
| 549 |
|
'executedLines' => 0, |
| 550 |
|
'ccn' => 0, |
| 551 |
|
'coverage' => 0, |
| 552 |
|
'crap' => 0, |
| 553 |
|
'package' => $class['package'], |
| 554 |
|
'link' => $link . $class['startLine'] |
| 555 |
|
); |
| 556 |
|
|
| 557 |
|
$this->startLines[$class['startLine']] = &$this->classes[$className]; |
| 558 |
|
$this->endLines[$class['endLine']] = &$this->classes[$className]; |
| 559 |
|
|
| 560 |
|
foreach ($class['methods'] as $methodName => $method) { |
| 561 |
|
$this->classes[$className]['methods'][$methodName] = array( |
| 562 |
|
'methodName' => $methodName, |
| 563 |
|
'signature' => $method['signature'], |
| 564 |
|
'startLine' => $method['startLine'], |
| 565 |
|
'endLine' => $method['endLine'], |
| 566 |
|
'executableLines' => 0, |
| 567 |
|
'executedLines' => 0, |
| 568 |
|
'ccn' => $method['ccn'], |
| 569 |
|
'coverage' => 0, |
| 570 |
|
'crap' => 0, |
| 571 |
|
'link' => $link . $method['startLine'] |
| 572 |
|
); |
| 573 |
|
|
| 574 |
|
$this->startLines[$method['startLine']] = &$this->classes[$className]['methods'][$methodName]; |
| 575 |
|
$this->endLines[$method['endLine']] = &$this->classes[$className]['methods'][$methodName]; |
| 576 |
|
} |
| 577 |
|
} |
| 578 |
|
} |
| 579 |
|
|
| 580 |
|
/** |
| 581 |
|
* @param PHP_Token_Stream $tokens |
|
@@ 583-625 (lines=43) @@
|
| 580 |
|
/** |
| 581 |
|
* @param PHP_Token_Stream $tokens |
| 582 |
|
*/ |
| 583 |
|
protected function processTraits(PHP_Token_Stream $tokens) |
| 584 |
|
{ |
| 585 |
|
$traits = $tokens->getTraits(); |
| 586 |
|
unset($tokens); |
| 587 |
|
|
| 588 |
|
$link = $this->getId() . '.html#'; |
| 589 |
|
|
| 590 |
|
foreach ($traits as $traitName => $trait) { |
| 591 |
|
$this->traits[$traitName] = array( |
| 592 |
|
'traitName' => $traitName, |
| 593 |
|
'methods' => array(), |
| 594 |
|
'startLine' => $trait['startLine'], |
| 595 |
|
'executableLines' => 0, |
| 596 |
|
'executedLines' => 0, |
| 597 |
|
'ccn' => 0, |
| 598 |
|
'coverage' => 0, |
| 599 |
|
'crap' => 0, |
| 600 |
|
'package' => $trait['package'], |
| 601 |
|
'link' => $link . $trait['startLine'] |
| 602 |
|
); |
| 603 |
|
|
| 604 |
|
$this->startLines[$trait['startLine']] = &$this->traits[$traitName]; |
| 605 |
|
$this->endLines[$trait['endLine']] = &$this->traits[$traitName]; |
| 606 |
|
|
| 607 |
|
foreach ($trait['methods'] as $methodName => $method) { |
| 608 |
|
$this->traits[$traitName]['methods'][$methodName] = array( |
| 609 |
|
'methodName' => $methodName, |
| 610 |
|
'signature' => $method['signature'], |
| 611 |
|
'startLine' => $method['startLine'], |
| 612 |
|
'endLine' => $method['endLine'], |
| 613 |
|
'executableLines' => 0, |
| 614 |
|
'executedLines' => 0, |
| 615 |
|
'ccn' => $method['ccn'], |
| 616 |
|
'coverage' => 0, |
| 617 |
|
'crap' => 0, |
| 618 |
|
'link' => $link . $method['startLine'] |
| 619 |
|
); |
| 620 |
|
|
| 621 |
|
$this->startLines[$method['startLine']] = &$this->traits[$traitName]['methods'][$methodName]; |
| 622 |
|
$this->endLines[$method['endLine']] = &$this->traits[$traitName]['methods'][$methodName]; |
| 623 |
|
} |
| 624 |
|
} |
| 625 |
|
} |
| 626 |
|
|
| 627 |
|
/** |
| 628 |
|
* @param PHP_Token_Stream $tokens |