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

LocationService::getAllLocationsCount()   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\LocationService as LocationServiceInterface;
9
use eZ\Publish\API\Repository\Values\Content\ContentInfo;
10
use eZ\Publish\API\Repository\Values\Content\Location;
11
use eZ\Publish\API\Repository\Values\Content\LocationCreateStruct;
12
use eZ\Publish\API\Repository\Values\Content\LocationUpdateStruct;
13
use eZ\Publish\API\Repository\Values\Content\VersionInfo;
14
15
class LocationService implements LocationServiceInterface
16
{
17
    /** @var Symfony\Component\EventDispatcher\EventDispatcherInterface */
18
    protected $eventDispatcher;
19
20
    public function __construct(LocationServiceInterface $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...
21
    {
22
        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...
23
24
        $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...
25
    }
26
27
    public function copySubtree(Location $subtree, Location $targetParentLocation)
28
    {
29
        parent::copySubtree($subtree, $targetParentLocation);
30
    }
31
32
    public function loadLocation($locationId, array $prioritizedLanguages = null, bool $useAlwaysAvailable = null)
33
    {
34
        parent::loadLocation($locationId, $prioritizedLanguages, $useAlwaysAvailable);
35
    }
36
37
    public function loadLocationList(array $locationIds, array $prioritizedLanguages = null, bool $useAlwaysAvailable = null): iterable
38
    {
39
        return parent::loadLocationList($locationIds, $prioritizedLanguages, $useAlwaysAvailable);
40
    }
41
42
    public function loadLocationByRemoteId($remoteId, array $prioritizedLanguages = null, bool $useAlwaysAvailable = null)
43
    {
44
        parent::loadLocationByRemoteId($remoteId, $prioritizedLanguages, $useAlwaysAvailable);
45
    }
46
47
    public function loadLocations(ContentInfo $contentInfo, Location $rootLocation = null, array $prioritizedLanguages = null)
48
    {
49
        parent::loadLocations($contentInfo, $rootLocation, $prioritizedLanguages);
50
    }
51
52
    public function loadLocationChildren(Location $location, $offset = 0, $limit = 25, array $prioritizedLanguages = null)
53
    {
54
        parent::loadLocationChildren($location, $offset, $limit, $prioritizedLanguages);
55
    }
56
57
    public function loadParentLocationsForDraftContent(VersionInfo $versionInfo, array $prioritizedLanguages = null)
58
    {
59
        parent::loadParentLocationsForDraftContent($versionInfo, $prioritizedLanguages);
60
    }
61
62
    public function getLocationChildCount(Location $location)
63
    {
64
        parent::getLocationChildCount($location);
65
    }
66
67
    public function createLocation(ContentInfo $contentInfo, LocationCreateStruct $locationCreateStruct)
68
    {
69
        parent::createLocation($contentInfo, $locationCreateStruct);
70
    }
71
72
    public function updateLocation(Location $location, LocationUpdateStruct $locationUpdateStruct)
73
    {
74
        parent::updateLocation($location, $locationUpdateStruct);
75
    }
76
77
    public function swapLocation(Location $location1, Location $location2)
78
    {
79
        parent::swapLocation($location1, $location2);
80
    }
81
82
    public function hideLocation(Location $location)
83
    {
84
        parent::hideLocation($location);
85
    }
86
87
    public function unhideLocation(Location $location)
88
    {
89
        parent::unhideLocation($location);
90
    }
91
92
    public function moveSubtree(Location $location, Location $newParentLocation)
93
    {
94
        parent::moveSubtree($location, $newParentLocation);
95
    }
96
97
    public function deleteLocation(Location $location)
98
    {
99
        parent::deleteLocation($location);
100
    }
101
102
    public function newLocationCreateStruct($parentLocationId)
103
    {
104
        parent::newLocationCreateStruct($parentLocationId);
105
    }
106
107
    public function newLocationUpdateStruct()
108
    {
109
        parent::newLocationUpdateStruct();
110
    }
111
112
    public function getAllLocationsCount(): int
113
    {
114
        return parent::getAllLocationsCount();
115
    }
116
117
    public function loadAllLocations(int $offset = 0, int $limit = 25): array
118
    {
119
        return parent::loadAllLocations($offset, $limit);
120
    }
121
}
122