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

URLWildcardService   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 37
rs 10
c 0
b 0
f 0
wmc 6
lcom 0
cbo 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A create() 0 4 1
A remove() 0 4 1
A load() 0 4 1
A loadAll() 0 4 1
A translate() 0 4 1
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\URLWildcardService as URLWildcardServiceInterface;
9
use eZ\Publish\API\Repository\Values\Content\URLWildcard;
10
11
class URLWildcardService implements URLWildcardServiceInterface
12
{
13
    /** @var Symfony\Component\EventDispatcher\EventDispatcherInterface */
14
    protected $eventDispatcher;
15
16
    public function __construct(URLWildcardServiceInterface $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...
17
    {
18
        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...
19
20
        $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...
21
    }
22
23
    public function create($sourceUrl, $destinationUrl, $forward = false)
24
    {
25
        parent::create($sourceUrl, $destinationUrl, $forward);
26
    }
27
28
    public function remove(URLWildcard $urlWildcard)
29
    {
30
        parent::remove($urlWildcard);
31
    }
32
33
    public function load($id)
34
    {
35
        parent::load($id);
36
    }
37
38
    public function loadAll($offset = 0, $limit = -1)
39
    {
40
        parent::loadAll($offset, $limit);
41
    }
42
43
    public function translate($url)
44
    {
45
        parent::translate($url);
46
    }
47
}
48