Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
CRAP | |
100.00% |
1 / 1 |
Currency | |
100.00% |
7 / 7 |
|
100.00% |
7 / 7 |
7 | |
100.00% |
1 / 1 |
getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getCode | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getSymbol | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getNumber | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getSubunits | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getDecimals | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getCountries | |
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 | * Currency 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 Currency |
26 | { |
27 | /** |
28 | * Currency id. |
29 | * |
30 | * @var int |
31 | * @since 1.0.0 |
32 | */ |
33 | public int $id = 0; |
34 | |
35 | /** |
36 | * Currency name. |
37 | * |
38 | * @var string |
39 | * @since 1.0.0 |
40 | */ |
41 | protected string $name = ''; |
42 | |
43 | /** |
44 | * Currency code. |
45 | * |
46 | * @var string |
47 | * @since 1.0.0 |
48 | */ |
49 | protected string $code = ''; |
50 | |
51 | /** |
52 | * Currency symbol. |
53 | * |
54 | * @var string |
55 | * @since 1.0.0 |
56 | */ |
57 | protected string $symbol = ''; |
58 | |
59 | /** |
60 | * Currency number. |
61 | * |
62 | * @var string |
63 | * @since 1.0.0 |
64 | */ |
65 | protected string $number = ''; |
66 | |
67 | /** |
68 | * Currency subunits. |
69 | * |
70 | * @var int |
71 | * @since 1.0.0 |
72 | */ |
73 | protected int $subunits = 0; |
74 | |
75 | /** |
76 | * Currency decimals. |
77 | * |
78 | * @var string |
79 | * @since 1.0.0 |
80 | */ |
81 | protected string $decimals = ''; |
82 | |
83 | /** |
84 | * Currency countries. |
85 | * |
86 | * @var string |
87 | * @since 1.0.0 |
88 | */ |
89 | protected string $countries = ''; |
90 | |
91 | /** |
92 | * Get currency name |
93 | * |
94 | * @return string |
95 | * |
96 | * @since 1.0.0 |
97 | */ |
98 | public function getName() : string |
99 | { |
100 | return $this->name; |
101 | } |
102 | |
103 | /** |
104 | * Get currency code |
105 | * |
106 | * @return string |
107 | * |
108 | * @since 1.0.0 |
109 | */ |
110 | public function getCode() : string |
111 | { |
112 | return $this->code; |
113 | } |
114 | |
115 | /** |
116 | * Get currency symbol |
117 | * |
118 | * @return string |
119 | * |
120 | * @since 1.0.0 |
121 | */ |
122 | public function getSymbol() : string |
123 | { |
124 | return $this->symbol; |
125 | } |
126 | |
127 | /** |
128 | * Get currency number |
129 | * |
130 | * @return string |
131 | * |
132 | * @since 1.0.0 |
133 | */ |
134 | public function getNumber() : string |
135 | { |
136 | return $this->number; |
137 | } |
138 | |
139 | /** |
140 | * Get currency subunits |
141 | * |
142 | * @return int |
143 | * |
144 | * @since 1.0.0 |
145 | */ |
146 | public function getSubunits() : int |
147 | { |
148 | return $this->subunits; |
149 | } |
150 | |
151 | /** |
152 | * Get currency decimals |
153 | * |
154 | * @return string |
155 | * |
156 | * @since 1.0.0 |
157 | */ |
158 | public function getDecimals() : string |
159 | { |
160 | return $this->decimals; |
161 | } |
162 | |
163 | /** |
164 | * Get currency countries |
165 | * |
166 | * @return string |
167 | * |
168 | * @since 1.0.0 |
169 | */ |
170 | public function getCountries() : string |
171 | { |
172 | return $this->countries; |
173 | } |
174 | } |