Operator   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 53
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A operator() 0 4 1
A firstOperand() 0 4 1
A secondOperand() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Cubiche package.
5
 *
6
 * Copyright (c) Cubiche
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace Cubiche\Core\Visitor\Tests\Fixtures;
12
13
/**
14
 * Operator Class.
15
 *
16
 * @author Karel Osorio Ramírez <[email protected]>
17
 */
18
abstract class Operator extends Expression
19
{
20
    /**
21
     * @var string
22
     */
23
    protected $operator;
24
25
    /**
26
     * @var Expression
27
     */
28
    protected $firstOperand;
29
30
    /**
31
     * @var Expression
32
     */
33
    protected $secondOperand;
34
35
    /**
36
     * @param string     $operator
37
     * @param Expression $firstOperand
38
     * @param Expression $secondOperand
39
     */
40
    public function __construct($operator, Expression $firstOperand, Expression $secondOperand)
41
    {
42
        $this->operator = $operator;
43
        $this->firstOperand = $firstOperand;
44
        $this->secondOperand = $secondOperand;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    public function operator()
51
    {
52
        return $this->operator;
53
    }
54
55
    /**
56
     * @return \Cubiche\Core\Visitor\Tests\Fixtures\Expression
57
     */
58
    public function firstOperand()
59
    {
60
        return $this->firstOperand;
61
    }
62
63
    /**
64
     * @return \Cubiche\Core\Visitor\Tests\Fixtures\Expression
65
     */
66
    public function secondOperand()
67
    {
68
        return $this->secondOperand;
69
    }
70
}
71