GenericOperator::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
1
<?php
2
3
namespace Devhelp\Piwik\Api\Param\Segment\Operator;
4
5
class GenericOperator implements Operator
6
{
7
    protected $field;
8
    protected $value;
9
    protected $operator;
10
11
    public function __construct($field, $value, $operator)
12
    {
13
        $this->field = $field;
14
        $this->value = $value;
15
        $this->operator = $operator;
16
    }
17
18
    public function expression()
19
    {
20
        return $this->field . $this->operator . $this->value;
21
    }
22
}
23