| Total Complexity | 1 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | abstract class Name implements Condition |
||
| 29 | { |
||
| 30 | /** |
||
| 31 | * Branch name to compare |
||
| 32 | * |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | protected string $name; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * OnBranch constructor. |
||
| 39 | * |
||
| 40 | * @param string $name |
||
| 41 | */ |
||
| 42 | 10 | public function __construct(string $name) |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Check is the current branch is equal to the configured one |
||
| 49 | * |
||
| 50 | * @param \CaptainHook\App\Console\IO $io |
||
| 51 | * @param \SebastianFeldmann\Git\Repository $repository |
||
| 52 | * @return bool |
||
| 53 | */ |
||
| 54 | abstract public function isTrue(IO $io, Repository $repository): bool; |
||
| 55 | } |
||
| 56 |