AbstractAssociation::getClassName()   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 1
Metric Value
c 1
b 0
f 1
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 Accessible\Annotation;
4
5
abstract class AbstractAssociation
6
{
7
    /**
8
     * The name of the property that refers to the current class.
9
     *
10
     * @var string
11
     */
12
    protected $associatedProperty;
13
14
    /**
15
     * The name of the class of the property.
16
     *
17
     * @var string
18
     */
19
    protected $className;
20
21
    /**
22
     * Initializes the annotation.
23
     *
24
     * @param mixed $values The name of the property that refers to the current class.
25
     */
26 7
    public function __construct($values)
27
    {
28 7
        $this->className = $values['className'];
29 7
        $this->associatedProperty = $values['propertyName'];
30 7
    }
31
32
    /**
33
     * Get the name of the property that refers to the current class.
34
     *
35
     * @return string The value.
36
     */
37 6
    public function getAssociatedProperty()
38
    {
39 6
        return $this->associatedProperty;
40
    }
41
42
    /**
43
     * Get the name of the class of the property.
44
     *
45
     * @return string The value.
46
     */
47 6
    public function getClassName()
48
    {
49 6
        return $this->className;
50
    }
51
}
52