AbstractReference::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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