| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | class AskConfirmation implements Handler |
||
| 28 | { |
||
| 29 | /** |
||
| 30 | * Question to ask |
||
| 31 | * |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | private string $question; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * No input ok or not |
||
| 38 | * |
||
| 39 | * @var bool |
||
| 40 | */ |
||
| 41 | private bool $default; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param string $question |
||
| 45 | * @param bool $default |
||
| 46 | */ |
||
| 47 | 3 | public function __construct(string $question, bool $default = false) |
|
| 48 | { |
||
| 49 | 3 | $this->question = $question; |
|
| 50 | 3 | $this->default = $default; |
|
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Writes the commit message to a cache file to reuse it for the next commit |
||
| 55 | * |
||
| 56 | * @param \CaptainHook\App\Event $event |
||
| 57 | * @return void |
||
| 58 | * @throws \CaptainHook\App\Exception\ActionFailed |
||
| 59 | */ |
||
| 60 | 2 | public function handle(Event $event): void |
|
| 64 | } |
||
| 65 | } |
||
| 67 |