Completed
Push — master ( 1fe708...6360f1 )
by Arnaud
16s queued 12s
created

DataOrderEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 45.45%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 4
eloc 10
c 1
b 1
f 0
dl 0
loc 26
ccs 5
cts 11
cp 0.4545
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 1
    public function __construct(AdminInterface $admin, DataSourceInterface $dataSource, array $orderBy)
17
    {
18 1
        $this->admin = $admin;
19 1
        $this->dataSource = $dataSource;
20 1
        $this->orderBy = $orderBy;
21 1
    }
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