Product   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 51
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A setName() 0 6 1
A getName() 0 4 1
A setCategories() 0 6 1
A getCategories() 0 4 1
1
<?php
2
3
namespace DoctrineORMModuleTest\Assets\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity
9
 * @ORM\Table(name="doctrine_orm_module_product")
10
 */
11
class Product
12
{
13
    /**
14
     * @ORM\Id
15
     * @ORM\Column(type="integer");
16
     * @ORM\GeneratedValue(strategy="AUTO")
17
     */
18
    protected $id;
19
20
    /**
21
     * @ORM\Column(type="string", nullable=true)
22
     */
23
    protected $name;
24
25
    /**
26
     * @ORM\ManyToMany(targetEntity="Category")
27
     */
28
    protected $categories;
29
30
    /**
31
     * @return int|null
32
     */
33
    public function getId()
34
    {
35
        return $this->id;
36
    }
37
38
    public function setName($name)
39
    {
40
        $this->name = $name;
41
42
        return $this;
43
    }
44
45
    public function getName()
46
    {
47
        return $this->name;
48
    }
49
50
    public function setCategories($categories)
51
    {
52
        $this->categories = $categories;
53
54
        return $this;
55
    }
56
57
    public function getCategories()
58
    {
59
        return $this->categories;
60
    }
61
}
62