ArrayRow   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 28
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getInternal() 0 4 1
A hasInternal() 0 4 1
A getSrc() 0 4 1
1
<?php
2
3
namespace Nayjest\Querying\Row;
4
5
class ArrayRow extends AbstractRow
6
{
7
    private $data;
8
9 5
    public function __construct(DynamicFieldsRegistry $dynamicFields, array $data)
10
    {
11 5
        $this->data = $data;
12 5
        parent::__construct($dynamicFields);
13 5
    }
14
15
    /**
16
     * @return array
17
     */
18 1
    public function getSrc()
19
    {
20 1
        return $this->data;
21
    }
22
23 2
    protected function getInternal($fieldName)
24
    {
25 2
        return $this->data[$fieldName];
26
    }
27
28 2
    protected function hasInternal($fieldName)
29
    {
30 2
        return array_key_exists($fieldName, $this->data);
31
    }
32
}
33