GenericOperator   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 18
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A expression() 0 4 1
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