Attributes   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 10
c 1
b 0
f 0
dl 0
loc 35
rs 10
ccs 11
cts 11
cp 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCondition() 0 3 1
A getColumnName() 0 3 1
A getProperty() 0 3 1
A __construct() 0 5 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