application/inc/Countries.php
Method getCountries
has 226 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static function getCountries(): array
{
return [
'DK' => _('Denmark'),
'FI' => _('Finland'),
The method getCountries() has 247 lines of code. Current threshold is set to 100. Avoid really long methods. Open
Open
private static function getCountries(): array
{
return [
'DK' => _('Denmark'),
'FI' => _('Finland'),
- Exclude checks
This function "getCountries" has 246 lines, which is greater than the 150 lines authorized. Split it into smaller functions. Open
Open
private static function getCountries(): array
- Read upRead up
- Exclude checks
A function that grows too large tends to aggregate too many responsibilities.
Such functions inevitably become harder to understand and therefore harder to maintain.
Above a specific threshold, it is strongly advised to refactor into smaller functions which focus on well-defined tasks.
Those smaller functions will not only be easier to understand, but also probably easier to test.
Line indented incorrectly; expected at least 4 spaces, found 0 Open
Open
{
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
$countries = self::getCountries();
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
return $countries;
- Exclude checks
Line indented incorrectly; expected at least 8 spaces, found 4 Open
Open
natcasesort($countries);
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
Open
}
- Exclude checks
Line indented incorrectly; expected 4 spaces, found 0 Open
Open
public static function getOrdered(): array
- Exclude checks