SimpleArrayRow   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 21
rs 10
ccs 7
cts 7
cp 1
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __isset() 0 3 1
A __construct() 0 3 1
A getValue() 0 3 1
1
<?php
2
3
namespace kalanis\kw_connect\core\Rows;
4
5
6
use kalanis\kw_connect\core\Interfaces\IRow;
7
8
9
/**
10
 * Class SimpleArrayRow
11
 * @package kalanis\kw_connect\core\Rows
12
 */
13
class SimpleArrayRow implements IRow
14
{
15
    /** @var array<int|string, int|string|float|bool|null> */
16
    protected array $array;
17
18
    /**
19
     * @param array<int|string, int|string|float|bool|null> $array
20
     */
21 18
    public function __construct(array $array)
22
    {
23 18
        $this->array = $array;
24 18
    }
25
26 17
    public function getValue($property)
27
    {
28 17
        return $this->array[$property];
29
    }
30
31 3
    public function __isset($name)
32
    {
33 3
        return isset($this->array[$name]);
34
    }
35
}
36