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

Property::left()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
 * A property of some variable.
15
 */
16
class Property extends Definition {
17
    /**
18
     * @var Definition 
19
     */
20
    protected $left;
21
22
    /**
23
     * @var Atom
24
     */
25
    protected $id;
26
27
    /**
28
     * @var Parameter[]
29
     */
30
    protected $parameters;
31
32
    public function __construct(Definition $left, Atom $id, array $parameters) {
33
        $this->left = $left;
34
        $this->id = $id;
35
        $this->parameters = array_map(function(Parameter $p) {
36
            return $p;
37
        }, $parameters);
38
    }
39
40
    /**
41
     * @return  Definition 
42
     */
43
    public function left() {
44
        return $this->left;
45
    }
46
47
    /**
48
     * @return  Atom 
49
     */
50
    public function id() {
51
        return $this->id;
52
    }
53
54
    /**
55
     * @return  Parameter[] 
56
     */
57
    public function parameters() {
58
        return $this->parameters;
59
    }
60
}
61
62