| Total Complexity | 5 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class HookSetupCommand extends Command |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * The console command name. |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $name = 'phpcs:install-hook'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The name and signature of the console command. |
||
| 23 | * |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $signature = 'phpcs:install-hook'; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * The console command description. |
||
| 30 | * |
||
| 31 | * @var string |
||
| 32 | */ |
||
| 33 | protected $description = 'Installs pre-commit git hook to run phpcs every on code changes.'; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Handles the Command |
||
| 37 | */ |
||
| 38 | public function handle(): void |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param $hookFile |
||
| 49 | * @param $gitHooksPath |
||
| 50 | * |
||
| 51 | * @return void |
||
| 52 | */ |
||
| 53 | protected function copyPreCommitHook($hookFile, $gitHooksPath): void |
||
| 60 | } |
||
| 61 | } |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @param $gitHooksPath |
||
| 65 | * |
||
| 66 | * @return void |
||
| 67 | */ |
||
| 68 | protected function setPermissions($gitHooksPath): void |
||
| 78 |