Passed
Pull Request — master (#259)
by Arnaud
08:22
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
namespace LAG\AdminBundle\Event\Events;
4
5
use LAG\AdminBundle\Admin\AdminInterface;
6
use LAG\AdminBundle\DataProvider\DataSourceInterface;
7
8
class DataOrderEvent
9
{
10
    private AdminInterface $admin;
11
    private DataSourceInterface $dataSource;
12
    private array $orderBy;
13
14
    public function __construct(AdminInterface $admin, DataSourceInterface $dataSource, array $orderBy)
15
    {
16
        $this->admin = $admin;
17
        $this->dataSource = $dataSource;
18
        $this->orderBy = $orderBy;
19
    }
20
21
    public function getAdmin(): AdminInterface
22
    {
23
        return $this->admin;
24
    }
25
26
    public function getDataSource(): DataSourceInterface
27
    {
28
        return $this->dataSource;
29
    }
30
31
    public function getOrderBy(): array
32
    {
33
        return $this->orderBy;
34
    }
35
}
36