Passed
Pull Request — master (#184)
by
unknown
10:18
created

QueryCreatedListener   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSubscribedEvents() 0 4 1
A onQueryCreated() 0 2 1
1
<?php
2
/*
3
4
This file was created by developers working at BitBag
5
6
Do you need more information about us and what we do? Visit our   website!
7
8
We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career
9
*/
10
declare(strict_types=1);
11
12
namespace BitBag\SyliusElasticsearchPlugin\EventListener;
13
14
15
16
use Elastica\Query;
17
18
19
final class QueryCreatedListener
20
{
21
22
    public static function getSubscribedEvents()
23
    {
24
        return [
25
            QueryCreatedEvent::NAME => 'onQueryCreated',
26
        ];
27
    }
28
29
    public function onQueryCreated(Query\BoolQuery $query)
0 ignored issues
show
Unused Code introduced by
The parameter $query is not used and could be removed. ( Ignorable by Annotation )

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

29
    public function onQueryCreated(/** @scrutinizer ignore-unused */ Query\BoolQuery $query)

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

Loading history...
30
    {
31
32
    }
33
}
34