TransPublisher::isSupported()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
ccs 0
cts 0
cp 0
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Arcanedev\LaravelLang\Contracts;
6
7
/**
8
 * Interface  TransPublisher
9
 *
10
 * @author    ARCANEDEV <[email protected]>
11
 */
12
interface TransPublisher
13
{
14
    /* -----------------------------------------------------------------
15
     |  Main Methods
16
     | -----------------------------------------------------------------
17
     */
18
19
    /**
20
     * Publish a lang.
21
     *
22
     * @param  string  $localeKey
23
     * @param  array   $options
24
     *
25
     * @return array
26
     *
27
     * @throws \Arcanedev\LaravelLang\Exceptions\LangPublishException
28
     */
29
    public function publish(string $localeKey, array $options = []): array;
30
31
    /* -----------------------------------------------------------------
32
     |  Check Methods
33
     | -----------------------------------------------------------------
34
     */
35
36
    /**
37
     * Check if the locale is a default one (English is shipped with laravel).
38
     *
39
     * @param  string  $locale
40
     *
41
     * @return bool
42
     */
43
    public function isDefault(string $locale): bool;
44
45
    /**
46
     * Check if the locale is supported.
47
     *
48
     * @param  string  $key
49
     *
50
     * @return bool
51
     */
52
    public function isSupported(string $key): bool;
53
}
54