Link::setFieldsKeys()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 7
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
3
namespace InertiaDashboardKit\Adapt\Columns;
4
5
class Link extends Column
6
{
7
    protected ?string $fieldText;
8
9
    public function toArray(): array
10
    {
11
        return array_merge(parent::toArray(), [
12
            'fieldText'      => $this->fieldText,
13
        ]);
14
    }
15
16
    public function setFieldsKeys(...$args): static
17
    {
18
        parent::setFieldsKeys(...$args);
19
20
        $this->fieldText      = $args[1] ?? null;
21
22
        return $this;
23
    }
24
}
25