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

SearchService::findSingle()   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 3
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\SearchService as SearchServiceInterface;
9
use eZ\Publish\API\Repository\Values\Content\LocationQuery;
10
use eZ\Publish\API\Repository\Values\Content\Query;
11
use eZ\Publish\API\Repository\Values\Content\Query\Criterion;
12
13
class SearchService implements SearchServiceInterface
14
{
15
    /** @var Symfony\Component\EventDispatcher\EventDispatcherInterface */
16
    protected $eventDispatcher;
17
18
    public function __construct(SearchServiceInterface $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...
19
    {
20
        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...
21
22
        $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...
23
    }
24
25
    public function findContent(Query $query, array $languageFilter = [], $filterOnUserPermissions = true)
26
    {
27
        parent::findContent($query, $languageFilter, $filterOnUserPermissions);
28
    }
29
30
    public function findContentInfo(Query $query, array $languageFilter = [], $filterOnUserPermissions = true)
31
    {
32
        parent::findContentInfo($query, $languageFilter, $filterOnUserPermissions);
33
    }
34
35
    public function findSingle(Criterion $filter, array $languageFilter = [], $filterOnUserPermissions = true)
36
    {
37
        parent::findSingle($filter, $languageFilter, $filterOnUserPermissions);
38
    }
39
40
    public function suggest($prefix, $fieldPaths = [], $limit = 10, Criterion $filter = null)
41
    {
42
        parent::suggest($prefix, $fieldPaths, $limit, $filter);
43
    }
44
45
    public function findLocations(LocationQuery $query, array $languageFilter = [], $filterOnUserPermissions = true)
46
    {
47
        parent::findLocations($query, $languageFilter, $filterOnUserPermissions);
48
    }
49
50
    public function supports($capabilityFlag)
51
    {
52
        parent::supports($capabilityFlag);
53
    }
54
}
55