Test Failed
Push — master ( 3b4c09...efb6fb )
by Richard
02:50
created

Any::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
/******************************************************************************
3
 * An implementation of dicto (scg.unibe.ch/dicto) in and for PHP.
4
 *
5
 * Copyright (c) 2016, 2015 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\Definition\AST;
12
13
/**
14
 * An any-definition.
15
 */
16
class Any extends Definition { 
17
    /**
18
     * @var Definition[]
19
     */
20
    protected  $definitions;
21
22
    public function __construct(array $definitions) {
23
        $this->definitions = array_map(function (Definition $d) {
24
            return $d;
25
        }, $definitions);
26
    }
27
28
    /**
29
     * @return Definition[]
30
     */
31
    public function definitions() {
32
        return $this->definitions;
33
    }
34
}
35