1 | <?php |
||
14 | class Transformer |
||
15 | { |
||
16 | use Concerns\NumberResolver; |
||
17 | use Concerns\TripletsConverter; |
||
18 | use Concerns\TripletTransformer; |
||
19 | |||
20 | /** |
||
21 | * @var DictionaryInterface |
||
22 | */ |
||
23 | protected $dictionary; |
||
24 | |||
25 | /** |
||
26 | * Tạo đối tượng mới với từ điển chỉ định. |
||
27 | * |
||
28 | * @param DictionaryInterface $dictionary |
||
29 | */ |
||
30 | public function __construct(?DictionaryInterface $dictionary = null) |
||
38 | |||
39 | /** |
||
40 | * Chuyển đổi số sang chữ số. |
||
41 | * |
||
42 | * @param int|float|string $number |
||
43 | * @return string |
||
44 | */ |
||
45 | public function toWords($number): string |
||
72 | |||
73 | /** |
||
74 | * Chuyển đổi số sang chữ số kết hợp với đơn vị tiền tệ. |
||
75 | * |
||
76 | * @param $number |
||
77 | * @param array|string[]|string $unit |
||
78 | * @return string |
||
79 | */ |
||
80 | public function toCurrency($number, $unit = 'đồng'): string |
||
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | protected function getDictionary(): DictionaryInterface |
||
109 | } |
||
110 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.