| Total Complexity | 2 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | abstract class Util |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * Indicates if commit hash is a zero hash 0000000000000000000000000000000000000000 |
||
| 28 | * |
||
| 29 | * @param string $hash |
||
| 30 | * @return bool |
||
| 31 | */ |
||
| 32 | 7 | public static function isZeroHash(string $hash): bool |
|
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Splits remote and branch |
||
| 39 | * |
||
| 40 | * origin/main => ['remote' => 'origin', 'branch' => 'main'] |
||
| 41 | * main => ['remote' => 'origin', 'branch' => 'main'] |
||
| 42 | * ref/origin/main => ['remote' => 'origin', 'branch' => 'main'] |
||
| 43 | * |
||
| 44 | * @param string $ref |
||
| 45 | * @return array<string, string> |
||
| 46 | */ |
||
| 47 | 13 | public static function extractBranchInfo(string $ref): array |
|
| 57 |