AddRowOperation   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A fromArray() 0 4 1
A __construct() 0 5 1
A getSrc() 0 4 1
A getRowClass() 0 4 1
1
<?php
2
namespace Nayjest\Querying\Operation;
3
4
use Nayjest\Querying\Row\ArrayRow;
5
6
class AddRowOperation implements OperationInterface
7
{
8
    /**
9
     * @var
10
     */
11
    private $src;
12
13
    /**
14
     * @var
15
     */
16
    private $rowClass;
17
18
    public static function fromArray(array $src)
19
    {
20
        return new static($src, ArrayRow::class);
21
    }
22
23
    public function __construct($src, $rowClass)
24
    {
25
        $this->src = $src;
26
        $this->rowClass = $rowClass;
27
    }
28
29
    public function getSrc()
30
    {
31
        return $this->src;
32
    }
33
34
    public function getRowClass()
35
    {
36
        return $this->rowClass;
37
    }
38
}
39