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

QueryCreatedEventFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createNewEvent() 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\Factory;
13
14
use BitBag\SyliusElasticsearchPlugin\EventListener\QueryCreatedEvent;
15
use BitBag\SyliusElasticsearchPlugin\EventListener\QueryCreatedEventInterface;
16
use Elastica\Query\AbstractQuery;
17
18
19
final class QueryCreatedEventFactory implements QueryCreatedEventFactoryInterface
20
{
21
    //przyjmuje boolquery return event
22
23
    public function createNewEvent(AbstractQuery $boolQuery): QueryCreatedEventInterface
24
    {
25
        return new QueryCreatedEvent($boolQuery);
26
    }
27
}
28