| Total Complexity | 6 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 8 | class NoVcsChangesCountProcess implements ChangesCountInterface |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The file the process will be executed on. |
||
| 12 | * @var File |
||
| 13 | */ |
||
| 14 | private $file; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Class constructor. |
||
| 18 | * @param File $file The file the process is being executed on. |
||
| 19 | */ |
||
| 20 | public function __construct(File $file) |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Returns the number of changes for a file. |
||
| 27 | * @return integer |
||
| 28 | */ |
||
| 29 | public function countChanges(): int |
||
| 30 | { |
||
| 31 | return 1; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Start the process. |
||
| 36 | * @return void |
||
| 37 | */ |
||
| 38 | public function start(): void |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Determines if the process was successful. |
||
| 44 | * @return boolean |
||
| 45 | * @throws ProcessFailedException If the process failed. |
||
| 46 | */ |
||
| 47 | public function isSuccessful(): bool |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Gets the file name of the file the process |
||
| 54 | * is being executed on. |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | public function getFilename(): string |
||
| 58 | { |
||
| 59 | return $this->file->getDisplayPath(); |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Gets the file the process is being executed on. |
||
| 64 | * @return File |
||
| 65 | */ |
||
| 66 | public function getFile(): File |
||
| 69 | } |
||
| 70 | } |
||
| 71 |