| Total Complexity | 5 | 
| Total Lines | 42 | 
| Duplicated Lines | 0 % | 
| Coverage | 0% | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 11 | abstract class AbstractFilesManipulatorTask extends AbstractTask | ||
| 12 | { | ||
| 13 | /** | ||
| 14 | * The files being manipulated. | ||
| 15 | * | ||
| 16 | * @var ManipulatedFile[] | ||
| 17 | */ | ||
| 18 | protected $manipulatedFiles = []; | ||
| 19 | |||
| 20 | /** | ||
| 21 | * Retrieve the files being manipulated | ||
| 22 | * | ||
| 23 | * @return ManipulatedFile[] | ||
| 24 | */ | ||
| 25 | public function getManipulatedFiles(): array | ||
| 26 |     { | ||
| 27 | return $this->manipulatedFiles; | ||
| 28 | } | ||
| 29 | |||
| 30 | /** | ||
| 31 | * Retrieve an instance of manipulated file with the given path | ||
| 32 | * | ||
| 33 | * @param string $path | ||
| 34 | * @return ManipulatedFile | ||
| 35 | */ | ||
| 36 | protected function file(string $path): ManipulatedFile | ||
| 37 |     { | ||
| 38 | return $this->manipulatedFiles[] = new ManipulatedFile($path); | ||
| 39 | } | ||
| 40 | |||
| 41 | /** | ||
| 42 | * Revert this task | ||
| 43 | * | ||
| 44 | * @return void | ||
| 45 | */ | ||
| 46 | protected function revert(): void | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } | ||
| 57 |