Attributes::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
namespace kalanis\kw_table\core\Table\Internal;
4
5
6
use kalanis\kw_table\core\Interfaces\Table\IRule;
7
8
9
/**
10
 * Class Attributes
11
 * @package kalanis\kw_table\core\Table\Internal
12
 * Styled attributes
13
 */
14
class Attributes
15
{
16
    /** @var int|string */
17
    protected $columnName = '';
18
    protected string $property = '';
19
    protected ?IRule $condition = null;
20
21
    /**
22
     * @param string|int $columnName
23
     * @param string $property
24
     * @param IRule|null $condition
25
     */
26 20
    public function __construct($columnName = '', string $property = '', ?IRule $condition = null)
27
    {
28 20
        $this->columnName = $columnName;
29 20
        $this->property = $property;
30 20
        $this->condition = $condition;
31 20
    }
32
33
    /**
34
     * @return int|string
35
     */
36 19
    public function getColumnName()
37
    {
38 19
        return $this->columnName;
39
    }
40
41 18
    public function getProperty(): string
42
    {
43 18
        return $this->property;
44
    }
45
46 4
    public function getCondition(): ?IRule
47
    {
48 4
        return $this->condition;
49
    }
50
}
51