Row   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 21
rs 10
wmc 3

3 Methods

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