Conditions | 1 |
Paths | 1 |
Total Lines | 69 |
Code Lines | 66 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
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 |
||
20 | public function localeDataProvider() |
||
21 | { |
||
22 | return [ |
||
23 | ['Australia', null, 'en_AU'], |
||
24 | ['Austria', null, 'de_AT'], |
||
25 | ['Argentina', null, 'es_AR'], |
||
26 | ['Belgium', 'French', 'fr_BE'], |
||
27 | ['Belgium', 'Dutch', 'nl_BE'], |
||
28 | ['Bolivia', null, 'es_BO'], |
||
29 | ['Brazil', null, 'pt_BR'], |
||
30 | ['Canada', 'French', 'fr_CA'], |
||
31 | ['Canada', 'English', 'en_CA'], |
||
32 | ['Chile', null, 'es_CL'], |
||
33 | ['China', 'English', 'en_CN'], |
||
34 | ['China', 'Chinese', 'zh_CN'], |
||
35 | ['Costa Rica', null, 'es_CR'], |
||
36 | ['Czech Republic', null, 'cs_CZ'], |
||
37 | ['Denmark', null, 'da_DK'], |
||
38 | ['Dominican Republic', null, 'es_DO'], |
||
39 | ['Ecuador', null, 'es_EC'], |
||
40 | ['Finland', null, 'fi_FI'], |
||
41 | ['France', null, 'fr_FR'], |
||
42 | ['Germany', null, 'de_DE'], |
||
43 | ['Guatemala', null, 'es_GT'], |
||
44 | ['Hungary', null, 'hu_HU'], |
||
45 | ['Hong Kong', null, 'en_HK'], |
||
46 | ['Italy', null, 'it_IT'], |
||
47 | ['Ireland', null, 'en_IE'], |
||
48 | ['India', null, 'en_IN'], |
||
49 | ['Japan', null, 'ja_JP'], |
||
50 | ['Korea', null, 'ko_KR'], |
||
51 | ['Luxembourg', null, 'fr_LU'], |
||
52 | ['Malaysia', null, 'en_MY'], |
||
53 | ['Mexico', null, 'es_MX'], |
||
54 | ['Morocco', null, 'fr_MA'], |
||
55 | ['Netherlands', null, 'nl_NL'], |
||
56 | ['New Zealand', null, 'en_NZ'], |
||
57 | ['Norway', null, 'no_NO'], |
||
58 | ['Oman', null, 'en_OM'], |
||
59 | ['Pakistan', null, 'en_PK'], |
||
60 | ['Panama', null, 'es_PA'], |
||
61 | ['Paraguay', null, 'es_PY'], |
||
62 | ['Philippines', null, 'en_PH'], |
||
63 | ['Peru', null, 'es_PE'], |
||
64 | ['Poland', null, 'pl_PL'], |
||
65 | ['Portugal', null, 'pt_PT'], |
||
66 | ['Puerto Rico', null, 'es_PR'], |
||
67 | ['Qatar', null, 'en_QA'], |
||
68 | ['Russia', null, 'ru_RU'], |
||
69 | ['Singapore', null, 'en_SG'], |
||
70 | ['Slovakia', null, 'sk_SK'], |
||
71 | ['South Africa', null, 'en_ZA'], |
||
72 | ['Spain', null, 'es_ES'], |
||
73 | ['Sweden', null, 'sv_SE'], |
||
74 | ['Switzerland', 'German', 'de_CH'], |
||
75 | ['Switzerland', 'French', 'fr_CH'], |
||
76 | ['Taiwan', null, 'en_TW'], |
||
77 | ['Turkey', null, 'tr_TR'], |
||
78 | ['Ukraine', 'Russian', 'ru_UA'], |
||
79 | ['Ukraine', 'Ukrainian', 'uk_UA'], |
||
80 | ['United Arab Emirates', null, 'en_AE'], |
||
81 | ['United Kingdom', null, 'en_GB'], |
||
82 | ['United States', null, 'en_US'], |
||
83 | ['Uruguay', null, 'es_UY'], |
||
84 | ['Venezuela', null, 'es_VE'], |
||
85 | ['Vietnam', 'English', 'en_VN'], |
||
86 | ['Vietnam', 'Vietnamese', 'vi_VN'], |
||
87 | ]; |
||
88 | } |
||
89 | } |
||
90 |