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