Constant   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 41
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A name() 0 4 1
A visibility() 0 4 1
1
<?php
2
3
namespace Leaditin\Code\Member;
4
5
use Leaditin\Code\Value;
6
use Leaditin\Code\Visibility;
7
8
/**
9
 * @package Leaditin\Code
10
 * @author Igor Vuckovic <[email protected]>
11
 * @license MIT
12
 */
13
class Constant extends Value
14
{
15
    /**
16
     * @var string
17
     */
18
    protected $name;
19
20
    /**
21
     * @var Visibility
22
     */
23
    protected $visibility;
24
25
    /**
26
     * @param string $name
27
     * @param mixed $value
28
     * @param Visibility $visibility
29
     */
30 1
    public function __construct(string $name, $value, Visibility $visibility)
31
    {
32 1
        $this->name = $name;
33 1
        $this->visibility = $visibility;
34
35 1
        parent::__construct($value);
36 1
    }
37
38
    /**
39
     * @return string
40
     */
41 1
    public function name(): string
42
    {
43 1
        return $this->name;
44
    }
45
46
    /**
47
     * @return Visibility
48
     */
49 1
    public function visibility(): Visibility
50
    {
51 1
        return $this->visibility;
52
    }
53
}
54