Passed
Pull Request — master (#12)
by Bas
02:32
created

MathExpression::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 3
dl 0
loc 5
ccs 0
cts 5
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace LaravelFreelancerNL\FluentAQL\Expressions;
4
5
class MathExpression extends PredicateExpression implements ExpressionInterface
6
{
7
    /** @var string */
8
    protected $leftOperand = '';
9
10
    /** @var string */
11
    protected $rightOperand = '';
12
13
    /** @var string */
14
    protected $operator = '';
15
16
    /**
17
     * Create predicate expression.
18
     *
19
     * @param string $leftOperand
20
     * @param string $rightOperand
21
     * @param string $operator
22
     */
23
    public function __construct($leftOperand, $rightOperand, $operator = '+')
24
    {
25
        $this->leftOperand = $leftOperand;
26
        $this->rightOperand = $rightOperand;
27
        $this->operator = $operator;
28
    }
29
}
30