Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
6 / 6 |
|
100.00% |
6 / 6 |
CRAP | |
100.00% |
1 / 1 |
| Language | |
100.00% |
6 / 6 |
|
100.00% |
6 / 6 |
6 | |
100.00% |
1 / 1 |
| getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getNative | |
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 | |||
| getCode3Native | |
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 | * Language 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 Language |
| 26 | { |
| 27 | /** |
| 28 | * Language id. |
| 29 | * |
| 30 | * @var int |
| 31 | * @since 1.0.0 |
| 32 | */ |
| 33 | public int $id = 0; |
| 34 | |
| 35 | /** |
| 36 | * Language name. |
| 37 | * |
| 38 | * @var string |
| 39 | * @since 1.0.0 |
| 40 | */ |
| 41 | protected string $name = ''; |
| 42 | |
| 43 | /** |
| 44 | * Language native. |
| 45 | * |
| 46 | * @var string |
| 47 | * @since 1.0.0 |
| 48 | */ |
| 49 | protected string $native = ''; |
| 50 | |
| 51 | /** |
| 52 | * Language code. |
| 53 | * |
| 54 | * @var string |
| 55 | * @since 1.0.0 |
| 56 | */ |
| 57 | protected string $code2 = ''; |
| 58 | |
| 59 | /** |
| 60 | * Language code. |
| 61 | * |
| 62 | * @var string |
| 63 | * @since 1.0.0 |
| 64 | */ |
| 65 | protected string $code3 = ''; |
| 66 | |
| 67 | /** |
| 68 | * Language code. |
| 69 | * |
| 70 | * @var string |
| 71 | * @since 1.0.0 |
| 72 | */ |
| 73 | protected string $code3Native = ''; |
| 74 | |
| 75 | /** |
| 76 | * Get id |
| 77 | * |
| 78 | * @return int |
| 79 | * |
| 80 | * @since 1.0.0 |
| 81 | */ |
| 82 | public function getId() : int |
| 83 | { |
| 84 | return $this->id; |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Get language name |
| 89 | * |
| 90 | * @return string |
| 91 | * |
| 92 | * @since 1.0.0 |
| 93 | */ |
| 94 | public function getName() : string |
| 95 | { |
| 96 | return $this->name; |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Get language native |
| 101 | * |
| 102 | * @return string |
| 103 | * |
| 104 | * @since 1.0.0 |
| 105 | */ |
| 106 | public function getNative() : string |
| 107 | { |
| 108 | return $this->native; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Get language code |
| 113 | * |
| 114 | * @return string |
| 115 | * |
| 116 | * @since 1.0.0 |
| 117 | */ |
| 118 | public function getCode2() : string |
| 119 | { |
| 120 | return $this->code2; |
| 121 | } |
| 122 | |
| 123 | /** |
| 124 | * Get language code |
| 125 | * |
| 126 | * @return string |
| 127 | * |
| 128 | * @since 1.0.0 |
| 129 | */ |
| 130 | public function getCode3() : string |
| 131 | { |
| 132 | return $this->code3; |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * Get language code |
| 137 | * |
| 138 | * @return string |
| 139 | * |
| 140 | * @since 1.0.0 |
| 141 | */ |
| 142 | public function getCode3Native() : string |
| 143 | { |
| 144 | return $this->code3Native; |
| 145 | } |
| 146 | } |