Completed
Push — master ( 1e9ef5...3740bc )
by Richard
05:53 queued 29s
created

_Combined::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
/******************************************************************************
3
 * An implementation of dicto (scg.unibe.ch/dicto) in and for PHP.
4
 * 
5
 * Copyright (c) 2016 Richard Klees <[email protected]>
6
 *
7
 * This software is licensed under The MIT License. You should have received 
8
 * a copy of the license along with the code.
9
 */
10
11
namespace Lechimp\Dicto\Graph\Predicate;
12
13
use Lechimp\Dicto\Graph\Predicate;
14
15
/**
16
 * A predicate that is some combination of other predicates.
17
 */
18
abstract class _Combined extends Predicate {
19
    /**
20
     * @var Predicate[]
21
     */
22
    protected $predicates;
23
24
    public function __construct(array $predicates) {
25 44
        $this->predicates = array_map(function(Predicate $p) {
26 44
            return $p;
27 44
        }, $predicates);
28 44
    }
29
}
30