Parameter   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 4 1
A accept() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace RulerZ\Model;
6
7
use Hoa\Visitor;
8
9
class Parameter implements Visitor\Element
10
{
11
    /**
12
     * The parameter's name.
13
     *
14
     * @var string|int
15
     */
16
    private $name;
17
18
    public function __construct($name)
19
    {
20
        $this->name = $name;
21
    }
22
23
    public function getName()
24
    {
25
        return $this->name;
26
    }
27
28
    /**
29
     * Accept a visitor.
30
     *
31
     * @param   \Hoa\Visitor\Visit  $visitor    Visitor.
32
     * @param   mixed               &$handle    Handle (reference).
33
     * @param   mixed               $eldnah     Handle (no reference).
34
     *
35
     * @return  mixed
36
     */
37
    public function accept(Visitor\Visit $visitor, &$handle = null, $eldnah = null)
38
    {
39
        return $visitor->visit($this, $handle, $eldnah);
40
    }
41
}
42