Issues (1)

helpers.php (1 issue)

Labels
Severity
1
<?php
2
3
if (! function_exists('i18n_strings_batch')) {
4
    /**
5
     * Get translations batch.
6
     *
7
     * @param string|array $keys
8
     * @param string|null  $locale
9
     *
10
     * @return array
11
     */
12
    function i18n_strings_batch(string|array $keys, ?string $locale = null): array
13
    {
14
        return \I18nStringsBatch\Facades\I18nStringsBatch::setLocale($locale)->getBatch($keys);
0 ignored issues
show
The method setLocale() does not exist on I18nStringsBatch\Facades\I18nStringsBatch. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

14
        return \I18nStringsBatch\Facades\I18nStringsBatch::/** @scrutinizer ignore-call */ setLocale($locale)->getBatch($keys);
Loading history...
15
16
    }
17
}
18
19
if (! function_exists('i18n_strings_batch_json')) {
20
    /**
21
     * Get translations batch encoded in json.
22
     *
23
     * @param string|array $keys
24
     * @param string|null  $locale
25
     * @return string
26
     */
27
    function i18n_strings_batch_json(string|array $keys, ?string $locale = null): string
28
    {
29
        return \I18nStringsBatch\Facades\I18nStringsBatch::setLocale($locale)->getBatchJson($keys);
30
    }
31
}
32