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

Rule   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 32
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A qualifier() 0 3 1
A definition() 0 3 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
 * A rule.
15
 */
16
class Rule extends Line {
17
    /**
18
     * @var Qualifier
19
     */
20
    protected $qualifier;
21
22
    /**
23
     * @var Definition
24
     */
25
    protected $definition;
26
27
    // A rule is just the qualification over the existence of entities
28
    // according to some definition.
29
    public function __construct(Qualifier $qualifier, Definition $definition) {
30
        $this->qualifier = $qualifier;
31
        $this->definition = $definition;
32
    }
33
34
    /**
35
     * @return  Qualifier 
36
     */
37
    public function qualifier() {
38
        return $this->qualifier;
39
    }
40
41
    /**
42
     * @return  Definition
43
     */
44
    public function definition() {
45
        return $this->definition;
46
    }
47
}
48
49