AbstractReference   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 27
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getName() 0 4 1
1
<?php
2
3
namespace SitePoint\Container\Reference;
4
5
/**
6
 * An abstract value object for a name that references some other value.
7
 */
8
abstract class AbstractReference
9
{
10
    /**
11
     * @var string
12
     */
13
    private $name;
14
15
    /**
16
     * Constructor for the container argument.
17
     *
18
     * @param string $name The service name.
19
     */
20 4
    public function __construct($name)
21
    {
22 4
        $this->name = $name;
23 4
    }
24
25
    /**
26
     * Retrieve the service name.
27
     *
28
     * @return string The service name.
29
     */
30 4
    public function getName()
31
    {
32 4
        return $this->name;
33
    }
34
}
35