AddFieldOperation::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
nc 1
cc 1
eloc 3
nop 2
crap 1
1
<?php
2
namespace Nayjest\Querying\Operation;
3
4
class AddFieldOperation implements OperationInterface
5
{
6
    /**
7
     * @var
8
     */
9
    private $fieldName;
10
    /**
11
     * @var callable
12
     */
13
    private $fn;
14
15 1
    public function __construct($fieldName, callable $fn)
16
    {
17 1
        $this->fieldName = $fieldName;
18 1
        $this->fn = $fn;
19 1
    }
20
21
    /**
22
     * @return string
23
     */
24 1
    public function getFieldName()
25
    {
26 1
        return $this->fieldName;
27
    }
28
29
    /**
30
     * @return callable
31
     */
32 1
    public function getCallable()
33
    {
34 1
        return $this->fn;
35
    }
36
}
37