Conditions | 1 |
Paths | 1 |
Total Lines | 58 |
Code Lines | 56 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
1 | <?php |
||
9 | public static function getCurrencies(): array |
||
10 | { |
||
11 | return [ |
||
12 | ["US Dollar", "USD", 1, 0.01], |
||
13 | ["Euro", "EUR", 1, 0.01], |
||
14 | ["Japanese Yen", "JPY", 100, 1], |
||
15 | ["Hong Kong Dollar", "HKD", 10, 0.01], |
||
16 | ["British Pound", "GBP", 1, 0.01], |
||
17 | ["Malaysian Ringgit", "MYR", 1, 0.01], |
||
18 | ["Russian Ruble", "RUB", 100, 0.01], |
||
19 | ["South African Rand", "ZAR", 10, 0.01], |
||
20 | ["South Korean Won", "KRW", 1000, 1], |
||
21 | ["UAE Dirham", "AED", 1, 0.01], |
||
22 | ["Saudi Riyal", "SAR", 1, 0.01], |
||
23 | ["Hungarian Forint", "HUF", 100, 1], |
||
24 | ["Polish Zloty", "PLN", 1, 0.01], |
||
25 | ["anish Krone", "DKK", 10, 0.01], |
||
26 | ["Swedish Krona", "SEK", 10, 0.01], |
||
27 | ["Norwegian Krone", "NOK", 10, 0.01], |
||
28 | ["Turkish Lira", "TRY", 10, 0.01], |
||
29 | ["Mexican Peso", "MXN", 10, 0.01], |
||
30 | ["Thai Baht", "THB", 10, 0.01], |
||
31 | ["Australian Dollar", "AUD", 1, 0.01], |
||
32 | ["Canadian Dollar", "CAD", 1, 0.01], |
||
33 | ["New Zealand Dollar", "NZD", 1, 0.01], |
||
34 | ["Singapore Dollar", "SGD", 1, 0.01], |
||
35 | ["Swiss Franc", "CHF", 1, 0.01], |
||
36 | ["Chinese Yuan", "CNY", 10, 0.01], |
||
37 | ["Algerian Dinar", "DZD", 100, 0.01], |
||
38 | ["Argentine Peso", "ARS", 10, 0.01], |
||
39 | ["Bangladeshi Taka", "BDT", 100, 0.01], |
||
40 | ["Bolivian Boliviano", "BOB", 10, 0.01], |
||
41 | ["Brazilian Real", "BRL", 1, 0.01], |
||
42 | ["Chilean Peso", "CLP", 1000, 1], |
||
43 | ["Colombian Peso", "COP", 1000, 1], |
||
44 | ["Costa Rican Colon", "CRC", 1000, 1], |
||
45 | ["Czech Koruna", "CZK", 10, 0.01], |
||
46 | ["Egyptian Pound", "EGP", 10, 0.01], |
||
47 | ["Guatemalan Quetzal", "GTQ", 10, 0.01], |
||
48 | ["Honduran Lempira", "HNL", 10, 0.01], |
||
49 | ["Icelandic Krona", "ISK", 100, 1], |
||
50 | ["Indian Rupee", "INR", 100, 0.01], |
||
51 | ["Indonesian Rupiah", "IDR", 10000, 1], |
||
52 | ["Israeli New Shekel", "ILS", 1, 0.01], |
||
53 | ["Kenyan Shilling", "KES", 100, 0.01], |
||
54 | ["Macanese Pataca", "MOP", 10, 0.01], |
||
55 | ["New Taiwan Dollar", "TWD", 10, 1], |
||
56 | ["Nicaraguan Cordoba", "NIO", 10, 0.01], |
||
57 | ["Nigerian Naira", "NGN", 100, 0.01], |
||
58 | ["Pakistani Rupee", "PKR", 100, 0.01], |
||
59 | ["Paraguayan Guarani", "PYG", 10000, 1], |
||
60 | ["Peruvian Nuevo Sol", "PEN", 1, 0.01], |
||
61 | ["Philippine Peso", "PHP", 100, 0.01], |
||
62 | ["Qatari Riyal", "QAR", 1, 0.01], |
||
63 | ["Romanian Leu", "RON", 1, 0.01], |
||
64 | ["Uruguayan Peso", "UYU", 10, 0.01], |
||
65 | ["Venezuelan Bolivar", "VEF", 100000, 1], |
||
66 | ["Vietnamese Dong", "VND", 10000, 1], |
||
67 | ]; |
||
70 |