ValueMap   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 66
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 3
Bugs 2 Features 0
Metric Value
c 3
b 2
f 0
dl 0
loc 66
rs 10
wmc 6
lcom 1
cbo 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getAttributes() 0 4 1
A getEmbeddables() 0 4 1
A setClass() 0 4 1
A getClass() 0 4 1
A getName() 0 8 2
1
<?php
2
3
namespace Analogue\ORM;
4
5
class ValueMap
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $name;
11
12
    /**
13
     * @var string
14
     */
15
    protected $class;
16
17
    /**
18
     * @var array
19
     */
20
    protected $embeddables = [];
21
22
    /**
23
     * @var array
24
     */
25
    protected $attributes = [];
26
27
    /**
28
     * @return array
29
     */
30
    public function getAttributes()
31
    {
32
        return $this->attributes;
33
    }
34
35
    /**
36
     * @return array
37
     */
38
    public function getEmbeddables()
39
    {
40
        return $this->embeddables;
41
    }
42
43
    /**
44
     * @param $class
45
     */
46
    public function setClass($class)
47
    {
48
        $this->class = $class;
49
    }
50
51
    /**
52
     * @return mixed
53
     */
54
    public function getClass()
55
    {
56
        return $this->class;
57
    }
58
59
    /**
60
     * @return string
61
     */
62
    public function getName()
63
    {
64
        if (isset($this->name)) {
65
            return $this->name;
66
        } else {
67
            return class_basename($this);
68
        }
69
    }
70
}
71