Passed
Pull Request — master (#259)
by Arnaud
08:22
created

DataFilterEvent::getDataSource()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 1
c 1
b 1
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace LAG\AdminBundle\Event\Events;
4
5
use LAG\AdminBundle\Admin\AdminInterface;
6
use LAG\AdminBundle\DataProvider\DataSourceInterface;
7
use Symfony\Contracts\EventDispatcher\Event;
8
9
class DataFilterEvent extends Event
10
{
11
    private AdminInterface $admin;
12
    private DataSourceInterface $dataSource;
13
    private array $filters;
14
15
    public function __construct(AdminInterface $admin, DataSourceInterface $dataSource, array $filters)
16
    {
17
        $this->admin = $admin;
18
        $this->dataSource = $dataSource;
19
        $this->filters = $filters;
20
    }
21
22
    public function getAdmin(): AdminInterface
23
    {
24
        return $this->admin;
25
    }
26
27
    public function getDataSource(): DataSourceInterface
28
    {
29
        return $this->dataSource;
30
    }
31
32
    public function getFilters(): array
33
    {
34
        return $this->filters;
35
    }
36
}
37