Passed
Pull Request — master (#184)
by
unknown
05:26
created

QueryCreatedEvent   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getQuery() 0 3 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
use Elastica\Query\AbstractQuery;
16
use Symfony\Contracts\EventDispatcher\Event;
17
18
19
final class QueryCreatedEvent extends Event implements QueryCreatedEventInterface
20
{
21
22
    /** @var AbstractQuery  */
23
    private $query;
24
25
    public function __construct(AbstractQuery $query)
26
    {
27
        $this->query = $query;
28
    }
29
30
    public function getQuery(): AbstractQuery
31
    {
32
        return $this->query;
33
    }
34
35
36
}
37