Completed
Push — master ( 7228f1...d8197d )
by Kévin
02:29
created

Rule   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 4
Bugs 0 Features 3
Metric Value
wmc 3
c 4
b 0
f 3
lcom 0
cbo 4
dl 0
loc 38
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getAccesses() 0 6 1
A getOperators() 0 6 1
A getParameters() 0 6 1
1
<?php
2
3
namespace RulerZ\Model;
4
5
use Hoa\Ruler\Model as HoaModel;
6
use RulerZ\Visitor;
7
8
class Rule extends HoaModel\Model
9
{
10
    /**
11
     * Returns a list of accessed variables.
12
     *
13
     * @return \Hoa\Ruler\Model\Bag\Context[]
14
     */
15
    public function getAccesses()
16
    {
17
        $visitor = new Visitor\AccessCollectorVisitor();
18
19
        return $visitor->visit($this);
20
    }
21
22
    /**
23
     * Returns a list of used operators.
24
     *
25
     * @return \Hoa\Ruler\Model\Operator[]
26
     */
27
    public function getOperators()
28
    {
29
        $visitor = new Visitor\OperatorCollectorVisitor();
30
31
        return $visitor->visit($this);
32
    }
33
34
    /**
35
     * Returns a list of used parameters.
36
     *
37
     * @return \Hoa\Ruler\Model\Parameter[]
38
     */
39
    public function getParameters()
40
    {
41
        $visitor = new Visitor\ParameterCollectorVisitor();
42
43
        return $visitor->visit($this);
44
    }
45
}
46