Passed
Pull Request — master (#259)
by Arnaud
07:09 queued 02:15
created

DataOrderEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getOrderBy() 0 3 1
A __construct() 0 5 1
A getAdmin() 0 3 1
A getDataSource() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LAG\AdminBundle\Event\Events;
6
7
use LAG\AdminBundle\Admin\AdminInterface;
8
use LAG\AdminBundle\DataProvider\DataSourceInterface;
9
10
class DataOrderEvent
11
{
12
    private AdminInterface $admin;
13
    private DataSourceInterface $dataSource;
14
    private array $orderBy;
15
16
    public function __construct(AdminInterface $admin, DataSourceInterface $dataSource, array $orderBy)
17
    {
18
        $this->admin = $admin;
19
        $this->dataSource = $dataSource;
20
        $this->orderBy = $orderBy;
21
    }
22
23
    public function getAdmin(): AdminInterface
24
    {
25
        return $this->admin;
26
    }
27
28
    public function getDataSource(): DataSourceInterface
29
    {
30
        return $this->dataSource;
31
    }
32
33
    public function getOrderBy(): array
34
    {
35
        return $this->orderBy;
36
    }
37
}
38