SimpleArrayRow::getValue()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
ccs 2
cts 2
cp 1
crap 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