GlobalContext   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
eloc 6
c 1
b 0
f 0
dl 0
loc 34
ccs 12
cts 12
cp 1
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getDataReader() 0 3 1
A getSortLinkAttributes() 0 3 1
A __construct() 0 7 1
A getUrlArguments() 0 3 1
A getFilterModelName() 0 3 1
A getUrlQueryParameters() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Yii\DataView\Column\Base;
6
7
use Yiisoft\Data\Reader\ReadableDataInterface;
8
9
final class GlobalContext
10
{
11 84
    public function __construct(
12
        private ReadableDataInterface $dataReader,
13
        private array $sortLinkAttributes,
14
        private array $urlArguments = [],
15
        private array $urlQueryParameters = [],
16
        private ?string $filterModelName = null,
17
    ) {
18 84
    }
19
20 67
    public function getDataReader(): ReadableDataInterface
21
    {
22 67
        return $this->dataReader;
23
    }
24
25 3
    public function getSortLinkAttributes(): array
26
    {
27 3
        return $this->sortLinkAttributes;
28
    }
29
30 3
    public function getUrlArguments(): array
31
    {
32 3
        return $this->urlArguments;
33
    }
34
35 3
    public function getUrlQueryParameters(): array
36
    {
37 3
        return $this->urlQueryParameters;
38
    }
39
40 17
    public function getFilterModelName(): ?string
41
    {
42 17
        return $this->filterModelName;
43
    }
44
}
45