| Total Complexity | 6 |
| Total Lines | 68 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class PredefinedProcess implements ChangesCountInterface, CyclomaticComplexityInterface |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var File |
||
| 14 | */ |
||
| 15 | private $file; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var integer |
||
| 19 | */ |
||
| 20 | private $countChanges; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var integer |
||
| 24 | */ |
||
| 25 | private $cyclomaticComplexity; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param File $file The file the process is being executed on. |
||
| 29 | * @param integer $countChanges The number of changes of the file. |
||
| 30 | * @param integer $cyclomaticComplexity The complexity of the file. |
||
| 31 | */ |
||
| 32 | public function __construct(File $file, int $countChanges, int $cyclomaticComplexity) |
||
| 33 | { |
||
| 34 | $this->file = $file; |
||
| 35 | $this->countChanges = $countChanges; |
||
| 36 | $this->cyclomaticComplexity = $cyclomaticComplexity; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Start the process. |
||
| 41 | */ |
||
| 42 | public function start(): void |
||
| 43 | { |
||
| 44 | // nothing to do |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Determines if the process was successful. |
||
| 49 | */ |
||
| 50 | public function isSuccessful(): bool |
||
| 51 | { |
||
| 52 | return true; |
||
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Gets the file the process is being executed on. |
||
| 57 | */ |
||
| 58 | public function getFile(): File |
||
| 59 | { |
||
| 60 | return $this->file; |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * Returns the number of changes for a file. |
||
| 65 | */ |
||
| 66 | public function countChanges(): int |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * Returns the cyclomatic complexity of a file. |
||
| 73 | */ |
||
| 74 | public function getCyclomaticComplexity(): int |
||
| 79 |