Completed
Push — signal-slots ( 93c761...7bf977 )
by
unknown
17:56
created

LanguageService::newLanguageCreateStruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace eZ\Publish\Core\Event;
6
7
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
8
use eZ\Publish\API\Repository\LanguageService as LanguageServiceInterface;
9
use eZ\Publish\API\Repository\Values\Content\Language;
10
use eZ\Publish\API\Repository\Values\Content\LanguageCreateStruct;
11
12
class LanguageService implements LanguageServiceInterface
13
{
14
    /** @var Symfony\Component\EventDispatcher\EventDispatcherInterface */
15
    protected $eventDispatcher;
16
17
    public function __construct(LanguageServiceInterface $innerService, EventDispatcherInterface $eventDispatcher)
0 ignored issues
show
Unused Code introduced by
The parameter $innerService is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
    {
19
        parent::__construct($innerRepository);
0 ignored issues
show
Bug introduced by
The variable $innerRepository does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
20
21
        $this->eventDispatcher = $eventDispatcher;
0 ignored issues
show
Documentation Bug introduced by
It seems like $eventDispatcher of type object<Symfony\Component...entDispatcherInterface> is incompatible with the declared type object<eZ\Publish\Core\E...entDispatcherInterface> of property $eventDispatcher.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
22
    }
23
24
    public function createLanguage(LanguageCreateStruct $languageCreateStruct)
25
    {
26
        parent::createLanguage($languageCreateStruct);
27
    }
28
29
    public function updateLanguageName(Language $language, $newName)
30
    {
31
        parent::updateLanguageName($language, $newName);
32
    }
33
34
    public function enableLanguage(Language $language)
35
    {
36
        parent::enableLanguage($language);
37
    }
38
39
    public function disableLanguage(Language $language)
40
    {
41
        parent::disableLanguage($language);
42
    }
43
44
    public function loadLanguage($languageCode)
45
    {
46
        parent::loadLanguage($languageCode);
47
    }
48
49
    public function loadLanguages()
50
    {
51
        parent::loadLanguages();
52
    }
53
54
    public function loadLanguageById($languageId)
55
    {
56
        parent::loadLanguageById($languageId);
57
    }
58
59
    public function loadLanguageListByCode(array $languageCodes): iterable
60
    {
61
        return parent::loadLanguageListByCode($languageCodes);
62
    }
63
64
    public function loadLanguageListById(array $languageIds): iterable
65
    {
66
        return parent::loadLanguageListById($languageIds);
67
    }
68
69
    public function deleteLanguage(Language $language)
70
    {
71
        parent::deleteLanguage($language);
72
    }
73
74
    public function getDefaultLanguageCode()
75
    {
76
        parent::getDefaultLanguageCode();
77
    }
78
79
    public function newLanguageCreateStruct()
80
    {
81
        parent::newLanguageCreateStruct();
82
    }
83
}
84