Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
CRAP | |
100.00% |
1 / 1 |
| Country | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
7 | |
100.00% |
1 / 1 |
| getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getCode2 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getCode3 | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getNumeric | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getSubdevision | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| isDeveloped | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Jingga |
| 4 | * |
| 5 | * PHP Version 8.1 |
| 6 | * |
| 7 | * @package phpOMS\Localization\Defaults |
| 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\Localization\Defaults; |
| 16 | |
| 17 | /** |
| 18 | * Country class. |
| 19 | * |
| 20 | * @package phpOMS\Localization\Defaults |
| 21 | * @license OMS License 2.0 |
| 22 | * @link https://jingga.app |
| 23 | * @since 1.0.0 |
| 24 | */ |
| 25 | class Country |
| 26 | { |
| 27 | /** |
| 28 | * Country id. |
| 29 | * |
| 30 | * @var int |
| 31 | * @since 1.0.0 |
| 32 | */ |
| 33 | public int $id = 0; |
| 34 | |
| 35 | /** |
| 36 | * Country name. |
| 37 | * |
| 38 | * @var string |
| 39 | * @since 1.0.0 |
| 40 | */ |
| 41 | protected string $name = ''; |
| 42 | |
| 43 | /** |
| 44 | * Country code. |
| 45 | * |
| 46 | * @var string |
| 47 | * @since 1.0.0 |
| 48 | */ |
| 49 | protected string $code2 = ''; |
| 50 | |
| 51 | /** |
| 52 | * Country code. |
| 53 | * |
| 54 | * @var string |
| 55 | * @since 1.0.0 |
| 56 | */ |
| 57 | protected string $code3 = ''; |
| 58 | |
| 59 | /** |
| 60 | * Country code. |
| 61 | * |
| 62 | * @var int |
| 63 | * @since 1.0.0 |
| 64 | */ |
| 65 | protected int $numeric = 0; |
| 66 | |
| 67 | /** |
| 68 | * Country subdevision. |
| 69 | * |
| 70 | * @var string |
| 71 | * @since 1.0.0 |
| 72 | */ |
| 73 | protected string $subdevision = ''; |
| 74 | |
| 75 | /** |
| 76 | * Country developed. |
| 77 | * |
| 78 | * @var bool |
| 79 | * @since 1.0.0 |
| 80 | */ |
| 81 | protected bool $isDeveloped = false; |
| 82 | |
| 83 | /** |
| 84 | * Get id |
| 85 | * |
| 86 | * @return int |
| 87 | * |
| 88 | * @since 1.0.0 |
| 89 | */ |
| 90 | public function getId() : int |
| 91 | { |
| 92 | return $this->id; |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * Get country name |
| 97 | * |
| 98 | * @return string |
| 99 | * |
| 100 | * @since 1.0.0 |
| 101 | */ |
| 102 | public function getName() : string |
| 103 | { |
| 104 | return $this->name; |
| 105 | } |
| 106 | |
| 107 | /** |
| 108 | * Get country code |
| 109 | * |
| 110 | * @return string |
| 111 | * |
| 112 | * @since 1.0.0 |
| 113 | */ |
| 114 | public function getCode2() : string |
| 115 | { |
| 116 | return $this->code2; |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Get country code |
| 121 | * |
| 122 | * @return string |
| 123 | * |
| 124 | * @since 1.0.0 |
| 125 | */ |
| 126 | public function getCode3() : string |
| 127 | { |
| 128 | return $this->code3; |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * Get country numeric |
| 133 | * |
| 134 | * @return int |
| 135 | * |
| 136 | * @since 1.0.0 |
| 137 | */ |
| 138 | public function getNumeric() : int |
| 139 | { |
| 140 | return $this->numeric; |
| 141 | } |
| 142 | |
| 143 | /** |
| 144 | * Get country subdevision |
| 145 | * |
| 146 | * @return string |
| 147 | * |
| 148 | * @since 1.0.0 |
| 149 | */ |
| 150 | public function getSubdevision() : string |
| 151 | { |
| 152 | return $this->subdevision; |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * Is country developed |
| 157 | * |
| 158 | * @return bool |
| 159 | * |
| 160 | * @since 1.0.0 |
| 161 | */ |
| 162 | public function isDeveloped() : bool |
| 163 | { |
| 164 | return $this->isDeveloped; |
| 165 | } |
| 166 | } |