Completed
Push — Recipes ( 630f49...c8afb0 )
by Laurent
12:15 queued 03:48
created

ZoneStorage   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 83
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 83
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 getSlug() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
/**
4
 * Entity ZoneStorage.
5
 *
6
 * PHP Version 7
7
 *
8
 * @author    Quétier Laurent <[email protected]>
9
 * @copyright 2014 Dev-Int GLSR
10
 * @license   http://opensource.org/licenses/gpl-license.php GNU Public License
11
 *
12
 * @version GIT: <git_id>
13
 *
14
 * @link https://github.com/Dev-Int/glsr
15
 */
16
namespace  App\Entity\Settings\Diverse;
17
18
use Doctrine\ORM\Mapping as ORM;
19
use Gedmo\Mapping\Annotation as Gedmo;
20
21
/**
22
 * ZoneStorage entity.
23
 *
24
 * @category Entity
25
 *
26
 * @ORM\Table(name="gs_zonestorage")
27
 * @ORM\Entity(repositoryClass="App\Repository\Settings\Diverse\ZoneStorageRepository")
28
 */
29
class ZoneStorage
30
{
31
    /**
32
     * @var int $zsId Id of the storage area
33
     *
34
     * @ORM\Column(name="id", type="integer")
35
     * @ORM\Id
36
     * @ORM\GeneratedValue(strategy="AUTO")
37
     */
38
    private $zsId;
39
40
    /**
41
     * @var string $name Name of the storage area
42
     *
43
     * @ORM\Column(name="name", type="string", length=255)
44
     */
45
    private $name;
46
    
47
    /**
48
     * @var string $slug Slug name
49
     * @Gedmo\Slug(fields={"name"})
50
     * @ORM\Column(length=128, unique=true)
51
     */
52
    private $slug;
53
54
    /**
55
     * Get id.
56
     *
57
     * @return int
58
     */
59
    public function getId()
60
    {
61
        return $this->zsId;
62
    }
63
64
    /**
65
     * Set name.
66
     *
67
     * @param string $name Name of the storage area
68
     *
69
     * @return Settings\Diverse\ZoneStorage
70
     */
71
    public function setName($name)
72
    {
73
        $this->name = $name;
74
75
        return $this;
76
    }
77
78
    /**
79
     * Get name.
80
     *
81
     * @return string
82
     */
83
    public function getName()
84
    {
85
        return $this->name;
86
    }
87
88
    /**
89
     * Get slug
90
     *
91
     * @return string
92
     */
93
    public function getSlug()
94
    {
95
        return $this->slug;
96
    }
97
98
    /**
99
     * This method allows to do "echo $zoneStorage".
100
     * <p> So, to "show" $unizoneStoraget,
101
     * PHP will actually show the return of this method. <br />
102
     * Here, the abbreviation, so "echo $zoneStorage"
103
     * is equivalent to "echo $zoneStorage->getName()" </ p>.
104
     *
105
     * @return string name
106
     */
107
    public function __toString()
108
    {
109
        return $this->name;
110
    }
111
}
112