File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -59,23 +59,22 @@ public function __construct(
5959 /**
6060 * Validates that the specified languages exist in the profanities directory.
6161 *
62- * @param string| array<string>|null $language
62+ * @param array<string>|null $languages
6363 * @return array<int, string> List of languages that don't exist
6464 */
65- private function validateLanguages ($ language ): array
65+ private function validateLanguages ($ languages ): array
6666 {
67- if ($ language === null ) {
67+ if ($ languages === null ) {
6868 return [];
6969 }
7070
7171 $ profanitiesDir = __DIR__ .'/Config/profanities ' ;
72- $ languages = is_string ($ language ) ? [$ language ] : $ language ;
7372 $ invalidLanguages = [];
7473
75- foreach ($ languages as $ lang ) {
76- $ specificLanguage = "$ profanitiesDir/ $ lang .php " ;
74+ foreach ($ languages as $ language ) {
75+ $ specificLanguage = "$ profanitiesDir/ $ language .php " ;
7776 if (! file_exists ($ specificLanguage )) {
78- $ invalidLanguages [] = $ lang ;
77+ $ invalidLanguages [] = $ language ;
7978 }
8079 }
8180
You can’t perform that action at this time.
0 commit comments