AbstractAssociation   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getAssociatedProperty() 0 4 1
A getClassName() 0 4 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