| Total Complexity | 5 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class AfterFileAnalysisEvent implements AfterFileAnalysis |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var ResultInterface |
||
| 16 | */ |
||
| 17 | private $result; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param ResultInterface $result The result for a file. |
||
| 21 | */ |
||
| 22 | public function __construct(ResultInterface $result) |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Returns the result for a file. |
||
| 29 | */ |
||
| 30 | public function getResult(): ResultInterface |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Returns the absolute path of the file. |
||
| 37 | */ |
||
| 38 | #[\Override] |
||
| 39 | public function getFilePath(): string |
||
| 40 | { |
||
| 41 | return $this->result->getFile()->getFullPath(); |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Returns the number of times the file has been changed. |
||
| 46 | */ |
||
| 47 | #[\Override] |
||
| 48 | public function getNumberOfChanges(): int |
||
| 49 | { |
||
| 50 | return $this->result->getCommits(); |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Returns the cyclomatic complexity of the file. |
||
| 55 | */ |
||
| 56 | #[\Override] |
||
| 60 | } |
||
| 61 | } |
||
| 62 |