Add missing strict typing in function params

This commit is contained in:
Joshua Ramon Enslin 2024-12-01 22:11:17 +01:00
parent d8db941485
commit e036d7881a
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -93,7 +93,7 @@ final class NodaConsolidatedNamesForPlaces extends NodaConsolidatedNamesAbstract
* *
* @return string * @return string
*/ */
private static function _rewrite_narrower_broader_pairs_to_brackets(string $name, string $indicator, $separator = ', '):string { private static function _rewrite_narrower_broader_pairs_to_brackets(string $name, string $indicator, string $separator = ', '):string {
if (str_contains($name, $indicator) if (str_contains($name, $indicator)
&& substr_count($name, $indicator) === 1 && substr_count($name, $indicator) === 1
@ -223,7 +223,7 @@ final class NodaConsolidatedNamesForPlaces extends NodaConsolidatedNamesAbstract
* *
* @return string * @return string
*/ */
private static function _rewrite_ukrainian_names_by_hierarchy($name):string { private static function _rewrite_ukrainian_names_by_hierarchy(string $name):string {
$identifiersByLevel = [ $identifiersByLevel = [
'state' => [' РСР', 'РСР ', ' АРСР', 'АРСР ', ' губернія', 'губернія '], 'state' => [' РСР', 'РСР ', ' АРСР', 'АРСР ', ' губернія', 'губернія '],
@ -325,7 +325,9 @@ final class NodaConsolidatedNamesForPlaces extends NodaConsolidatedNamesAbstract
} }
$output = $main_name; $output = $main_name;
if (!empty($specifiers)) $output .= ' (' . implode(', ', $specifiers) . ')'; if (!empty($specifiers)) {
$output .= ' (' . implode(', ', $specifiers) . ')';
}
return $output; return $output;