| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 38 | protected function getTranslationsForTranslationLoaders( |
||
| 39 | string $locale, |
||
| 40 | string $group, |
||
| 41 | string $namespace = null |
||
| 42 | ): array { |
||
| 43 | return collect(config('laravel-multilingual.translation_loaders')) |
||
| 44 | ->map(function (string $className) { |
||
| 45 | return app($className); |
||
| 46 | }) |
||
| 47 | ->mapWithKeys(function (TranslationLoader $translationLoader) use ($locale, $group, $namespace) { |
||
| 48 | return $translationLoader->loadTranslations($locale, $group, $namespace); |
||
|
|
|||
| 49 | }) |
||
| 50 | ->toArray(); |
||
| 51 | } |
||
| 53 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.