| @@ 89-107 (lines=19) @@ | ||
| 86 | * |
|
| 87 | * @throws Exception |
|
| 88 | */ |
|
| 89 | protected function pdepend() |
|
| 90 | { |
|
| 91 | $application = new Application(); |
|
| 92 | $runner = $application->getRunner(); |
|
| 93 | ||
| 94 | $runner->setSourceArguments(array($this->config['path'])); |
|
| 95 | $runner->addReportGenerator('summary-xml', $this->buildPath.DIRECTORY_SEPARATOR.$this->xml); |
|
| 96 | ||
| 97 | // exclude directories are evaluated relative to where pdepend is being |
|
| 98 | // run from, not what it is running on |
|
| 99 | $converter = new PathConverter($this->config['path'], getcwd()); |
|
| 100 | $exclude = array_map(array($converter, 'convert'), $this->config['exclude_folders']); |
|
| 101 | $runner->setExcludeDirectories($exclude); |
|
| 102 | ||
| 103 | $status = $runner->run(); |
|
| 104 | if ($status !== 0) { |
|
| 105 | throw new Exception('Unable to generate pdepend metrics.'); |
|
| 106 | } |
|
| 107 | } |
|
| 108 | ||
| 109 | /** |
|
| 110 | * Fetch build data from CI. |
|
| @@ 91-109 (lines=19) @@ | ||
| 88 | * |
|
| 89 | * @throws Exception |
|
| 90 | */ |
|
| 91 | protected function pdepend() |
|
| 92 | { |
|
| 93 | $application = new Application(); |
|
| 94 | $runner = $application->getRunner(); |
|
| 95 | ||
| 96 | $runner->setSourceArguments(array($this->config['path'])); |
|
| 97 | $runner->addReportGenerator('summary-xml', $this->buildPath.DIRECTORY_SEPARATOR.$this->xml); |
|
| 98 | ||
| 99 | // exclude directories are evaluated relative to where pdepend is being |
|
| 100 | // run from, not what it is running on |
|
| 101 | $converter = new PathConverter($this->config['path'], getcwd()); |
|
| 102 | $exclude = array_map(array($converter, 'convert'), $this->config['exclude_folders']); |
|
| 103 | $runner->setExcludeDirectories($exclude); |
|
| 104 | ||
| 105 | $status = $runner->run(); |
|
| 106 | if ($status !== 0) { |
|
| 107 | throw new Exception('Unable to generate pdepend metrics.'); |
|
| 108 | } |
|
| 109 | } |
|
| 110 | ||
| 111 | /** |
|
| 112 | * Transform pdepend output into the (more succinct) format cauditor |
|