Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
| Branch | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Jingga |
| 4 | * |
| 5 | * PHP Version 8.1 |
| 6 | * |
| 7 | * @package phpOMS\Utils\Git |
| 8 | * @copyright Dennis Eichhorn |
| 9 | * @license OMS License 2.0 |
| 10 | * @version 1.0.0 |
| 11 | * @link https://jingga.app |
| 12 | */ |
| 13 | declare(strict_types=1); |
| 14 | |
| 15 | namespace phpOMS\Utils\Git; |
| 16 | |
| 17 | /** |
| 18 | * Gray encoding class |
| 19 | * |
| 20 | * @package phpOMS\Utils\Git |
| 21 | * @license OMS License 2.0 |
| 22 | * @link https://jingga.app |
| 23 | * @since 1.0.0 |
| 24 | */ |
| 25 | class Branch |
| 26 | { |
| 27 | /** |
| 28 | * Name. |
| 29 | * |
| 30 | * @var string |
| 31 | * @since 1.0.0 |
| 32 | */ |
| 33 | public string $name = ''; |
| 34 | |
| 35 | /** |
| 36 | * Constructor |
| 37 | * |
| 38 | * @param string $name Branch name |
| 39 | * |
| 40 | * @since 1.0.0 |
| 41 | */ |
| 42 | public function __construct(string $name = '') |
| 43 | { |
| 44 | $this->setName($name); |
| 45 | } |
| 46 | |
| 47 | /** |
| 48 | * Set branch name |
| 49 | * |
| 50 | * @param string $name Branch name |
| 51 | * |
| 52 | * @return void |
| 53 | * |
| 54 | * @since 1.0.0 |
| 55 | */ |
| 56 | public function setName(string $name) : void |
| 57 | { |
| 58 | $this->name = $name; |
| 59 | } |
| 60 | } |