| 1 | <?php |
||
| 9 | class AnalysisException extends Exception |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var ComplexityComputer |
||
| 14 | */ |
||
| 15 | protected static $complexityComputer; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var Node |
||
| 19 | */ |
||
| 20 | protected $node; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @return Node |
||
| 24 | */ |
||
| 25 | public function getNode() |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return int|array |
||
| 32 | */ |
||
| 33 | public function getLineNumber() |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param Node $node |
||
| 43 | * @return $this |
||
| 44 | */ |
||
| 45 | public function setNode(Node $node) |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Returns a new Exception instance with node. |
||
| 54 | * |
||
| 55 | * @param Node $node |
||
| 56 | * @return AnalysisException |
||
| 57 | */ |
||
| 58 | public static function withNode(Node $node) |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Returns params for the message. |
||
| 66 | * |
||
| 67 | * @return array |
||
| 68 | */ |
||
| 69 | public function getMessageParams() |
||
| 73 | |||
| 74 | public static function setComplexityComputer(ComplexityComputer $complexityComputer) |
||
| 78 | |||
| 79 | /** |
||
| 80 | * Calculates Cylomatic Complexity Number. |
||
| 81 | * |
||
| 82 | * @param Node $node |
||
| 83 | * @return int |
||
| 84 | */ |
||
| 85 | protected static function calculateCCN(Node $node) |
||
| 89 | } |
||
| 90 |