| Conditions | 1 |
| Paths | 1 |
| Total Lines | 97 |
| Code Lines | 41 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 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 |
||
| 33 | public static function localeList(): array |
||
| 34 | { |
||
| 35 | return [ |
||
| 36 | [ |
||
| 37 | 'cs_CZ', |
||
| 38 | [ |
||
| 39 | 'cs_CZ', |
||
| 40 | 'cs', |
||
| 41 | ], |
||
| 42 | ], |
||
| 43 | [ |
||
| 44 | 'sr_CS.UTF-8@latin', |
||
| 45 | [ |
||
| 46 | 'sr_CS.UTF-8@latin', |
||
| 47 | 'sr_CS@latin', |
||
| 48 | 'sr@latin', |
||
| 49 | 'sr_CS.UTF-8', |
||
| 50 | 'sr_CS', |
||
| 51 | 'sr', |
||
| 52 | ], |
||
| 53 | ], |
||
| 54 | // For a locale containing country code, we prefer |
||
| 55 | // full locale name, but if that's not found, fall back |
||
| 56 | // to the language only locale name. |
||
| 57 | [ |
||
| 58 | 'sr_RS', |
||
| 59 | [ |
||
| 60 | 'sr_RS', |
||
| 61 | 'sr', |
||
| 62 | ], |
||
| 63 | ], |
||
| 64 | // If language code is used, it's the only thing returned. |
||
| 65 | [ |
||
| 66 | 'sr', |
||
| 67 | ['sr'], |
||
| 68 | ], |
||
| 69 | // There is support for language and charset only. |
||
| 70 | [ |
||
| 71 | 'sr.UTF-8', |
||
| 72 | [ |
||
| 73 | 'sr.UTF-8', |
||
| 74 | 'sr', |
||
| 75 | ], |
||
| 76 | ], |
||
| 77 | |||
| 78 | // It can also split out character set from the full locale name. |
||
| 79 | [ |
||
| 80 | 'sr_RS.UTF-8', |
||
| 81 | [ |
||
| 82 | 'sr_RS.UTF-8', |
||
| 83 | 'sr_RS', |
||
| 84 | 'sr', |
||
| 85 | ], |
||
| 86 | ], |
||
| 87 | |||
| 88 | // There is support for @modifier in locale names as well. |
||
| 89 | [ |
||
| 90 | 'sr_RS.UTF-8@latin', |
||
| 91 | [ |
||
| 92 | 'sr_RS.UTF-8@latin', |
||
| 93 | 'sr_RS@latin', |
||
| 94 | 'sr@latin', |
||
| 95 | 'sr_RS.UTF-8', |
||
| 96 | 'sr_RS', |
||
| 97 | 'sr', |
||
| 98 | ], |
||
| 99 | ], |
||
| 100 | [ |
||
| 101 | 'sr.UTF-8@latin', |
||
| 102 | [ |
||
| 103 | 'sr.UTF-8@latin', |
||
| 104 | 'sr@latin', |
||
| 105 | 'sr.UTF-8', |
||
| 106 | 'sr', |
||
| 107 | ], |
||
| 108 | ], |
||
| 109 | |||
| 110 | // We can pass in only language and modifier. |
||
| 111 | [ |
||
| 112 | 'sr@latin', |
||
| 113 | [ |
||
| 114 | 'sr@latin', |
||
| 115 | 'sr', |
||
| 116 | ], |
||
| 117 | ], |
||
| 118 | |||
| 119 | // If locale name is not following the regular POSIX pattern, |
||
| 120 | // it's used verbatim. |
||
| 121 | [ |
||
| 122 | 'something', |
||
| 123 | ['something'], |
||
| 124 | ], |
||
| 125 | |||
| 126 | // Passing in an empty string returns an empty array. |
||
| 127 | [ |
||
| 128 | '', |
||
| 129 | [], |
||
| 130 | ], |
||
| 317 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths