AndOperator   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 13
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A execute() 0 4 2
A __toString() 0 4 1
1
<?php
2
3
4
namespace CondParse\Operand;
5
6
7
class AndOperator extends AbstractLeftRightOperator
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
8
{
9
    /** @return bool */
10 4
    public function execute()
11
    {
12 4
        return $this->leftOperand->execute() && $this->rightOperand->execute();
13
    }
14
15 7
    public function __toString()
16
    {
17 7
        return sprintf('AND(%s, %s)', $this->leftOperand, $this->rightOperand);
18
    }
19
}
20