Passed
Pull Request — main (#123)
by Andrey
33:51 queued 18:50
created

Provider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 12
dl 0
loc 29
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A basePath() 0 3 1
A plugins() 0 12 1
1
<?php
2
3
/*
4
 * This file is part of the "andrey-helldar/laravel-lang-publisher" project.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * @author Andrey Helldar <[email protected]>
10
 *
11
 * @copyright 2021 Andrey Helldar
12
 *
13
 * @license MIT
14
 *
15
 * @see https://github.com/andrey-helldar/laravel-lang-publisher
16
 */
17
18
declare(strict_types=1);
19
20
namespace LaravelLang\Lang\Publisher;
21
22
use Helldar\LaravelLangPublisher\Plugins\BaseProvider;
23
use LaravelLang\Lang\Publisher\Plugins\Breeze;
24
use LaravelLang\Lang\Publisher\Plugins\Cashier;
25
use LaravelLang\Lang\Publisher\Plugins\Fortify;
26
use LaravelLang\Lang\Publisher\Plugins\Jetstream;
27
use LaravelLang\Lang\Publisher\Plugins\Laravel;
28
use LaravelLang\Lang\Publisher\Plugins\Lumen;
29
use LaravelLang\Lang\Publisher\Plugins\Nova;
30
use LaravelLang\Lang\Publisher\Plugins\SparkPaddle;
31
use LaravelLang\Lang\Publisher\Plugins\SparkStripe;
32
33
class Provider extends BaseProvider
34
{
35
    /**
36
     * Indicates the base path of the provider.
37
     *
38
     * For example, `__DIR__`
39
     *
40
     * @return string
41
     */
42
    public function basePath(): string
43
    {
44
        return realpath(__DIR__ . '/../../../vendor/laravel-lang/lang');
45
    }
46
47
    /**
48
     * @return \Helldar\Contracts\LangPublisher\Plugin[]
49
     */
50
    public function plugins(): array
51
    {
52
        return $this->resolvePlugins([
53
            Breeze::class,
54
            Cashier::class,
55
            Fortify::class,
56
            Jetstream::class,
57
            Laravel::class,
58
            Lumen::class,
59
            Nova::class,
60
            SparkPaddle::class,
61
            SparkStripe::class,
62
        ]);
63
    }
64
}
65