Expression   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 21
rs 10
c 0
b 0
f 0
ccs 8
cts 8
cp 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
match() 0 1 ?
A __construct() 0 4 1
A add() 0 4 1
A getExpressions() 0 4 1
1
<?php
2
3
namespace Mattbit\Flat\Query\Expression\Tree;
4
5
use Mattbit\Flat\Model\DocumentInterface;
6
use Mattbit\Flat\Query\Expression\ExpressionInterface;
7
8
abstract class Expression implements ExpressionInterface
9
{
10
    protected $expressions = [];
11
12
    abstract public function match(DocumentInterface $document);
13
14 11
    public function __construct($expressions = [])
15
    {
16 11
        $this->expressions = $expressions;
17 11
    }
18
19 2
    public function add($expression)
20
    {
21 2
        $this->expressions[] = $expression;
22 2
    }
23
24 6
    public function getExpressions()
25
    {
26 6
        return $this->expressions;
27
    }
28
}
29