Plugin::load()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
eloc 0
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the dotfiles project.
7
 *
8
 *     (c) Anthonius Munthi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Dotfiles\Core;
15
16
use Symfony\Component\DependencyInjection\ContainerBuilder;
17
use Symfony\Component\DependencyInjection\Extension\Extension;
18
19
/**
20
 * Class Plugin.
21
 */
22
abstract class Plugin extends Extension
23
{
24
    public function getName(): string
25
    {
26
        $class = get_class($this);
27
        $exp = explode('\\', $class);
28
        $baseClassName = $exp[count($exp) - 1];
29
        $pluginName = strtolower(str_replace('Plugin', '', $baseClassName));
30
31
        return $pluginName;
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function load(array $configs, ContainerBuilder $container): void
38
    {
39
    }
40
}
41