BaseConfigGroup::getGroupKey()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Xiidea\EasyConfigBundle\Services\FormGroup;
4
5
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
6
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
7
use Xiidea\EasyConfigBundle\Utility\StringUtil;
8
9
abstract class BaseConfigGroup implements ConfigGroupInterface
10
{
11
    protected static TokenStorageInterface $tokenStorage;
12
    protected static UrlGeneratorInterface $urlGenerator;
13
14
    public function __construct(TokenStorageInterface $tokenStorage, UrlGeneratorInterface $urlGenerator)
15
    {
16
        self::$tokenStorage = $tokenStorage;
17
        self::$urlGenerator = $urlGenerator;
18
    }
19
20
    public function getLabel(): string
21
    {
22
        return StringUtil::getLabelFromClass(get_called_class());
23
    }
24
25
    public function getNameSpace(): string
26
    {
27
        return 'app';
28
    }
29
30
    public function getAuthorSecurityLevels(): ?string
31
    {
32
        return null;
33
    }
34
35
    public function getViewSecurityLevels(): ?string
36
    {
37
        return null;
38
    }
39
40
    public function getRouteName(): ?string
41
    {
42
        return 'xiidea_easy_config_form';
43
    }
44
45
    public function getName(): ?string
46
    {
47
        return 'name';
48
    }
49
50
    public function getGroupKey(): ?string
51
    {
52
        return 'miscellaneous';
53
    }
54
55
    public function getGroupLabel(): ?string
56
    {
57
        return StringUtil::humanize(static::getGroupKey());
0 ignored issues
show
Bug Best Practice introduced by
The method Xiidea\EasyConfigBundle\...figGroup::getGroupKey() is not static, but was called statically. ( Ignorable by Annotation )

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

57
        return StringUtil::humanize(static::/** @scrutinizer ignore-call */ getGroupKey());
Loading history...
58
    }
59
60
    public function getGroupIcon(): ?string
61
    {
62
        return null;
63
    }
64
65
    public function getPriority(): int
66
    {
67
        return 0;
68
    }
69
}
70