Software   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 128
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 8
lcom 0
cbo 1
dl 0
loc 128
rs 10
c 0
b 0
f 0

8 Methods

Rating   Name   Duplication   Size   Complexity  
A setYear() 0 6 1
A getYear() 0 4 1
A setAuthor() 0 6 1
A getAuthor() 0 4 1
A setVersion() 0 6 1
A getVersion() 0 4 1
A setOs() 0 6 1
A getOs() 0 4 1
1
<?php
2
3
namespace KI\PonthubBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use JMS\Serializer\Annotation as JMS;
7
use KI\PonthubBundle\Entity\PonthubFile;
8
use Symfony\Component\Validator\Constraints as Assert;
9
10
/**
11
 * @ORM\Entity
12
 * @JMS\ExclusionPolicy("all")
13
 */
14
class Software extends PonthubFile
15
{
16
    /**
17
     * Année
18
     * @ORM\Column(name="year", type="integer", nullable=true)
19
     * @JMS\Expose
20
     * @Assert\Range(min = 1000, max = 2050)
21
     */
22
    protected $year;
23
24
    /**
25
     * Studio/développeur
26
     * @ORM\Column(name="author", type="string", nullable=true)
27
     * @JMS\Expose
28
     * @Assert\Type("string")
29
     */
30
    protected $author;
31
32
    /**
33
     * Version
34
     * @ORM\Column(name="version", type="string", nullable=true)
35
     * @JMS\Expose
36
     * @Assert\Type("string")
37
     */
38
    protected $version;
39
40
    /**
41
     * Operating System
42
     * @ORM\Column(name="os", type="string", nullable=true)
43
     * @JMS\Expose
44
     * @Assert\Type("string")
45
     */
46
    protected $os;
47
48
    /**
49
     * Set year
50
     *
51
     * @param integer $year
52
     * @return Game
53
     */
54
    public function setYear($year)
55
    {
56
        $this->year = $year;
57
58
        return $this;
59
    }
60
61
    /**
62
     * Get year
63
     *
64
     * @return integer
65
     */
66
    public function getYear()
67
    {
68
        return $this->year;
69
    }
70
71
    /**
72
     * Set author
73
     *
74
     * @param string $author
75
     * @return Software
76
     */
77
    public function setAuthor($author)
78
    {
79
        $this->author = $author;
80
81
        return $this;
82
    }
83
84
    /**
85
     * Get author
86
     *
87
     * @return string
88
     */
89
    public function getAuthor()
90
    {
91
        return $this->author;
92
    }
93
94
    /**
95
     * Set version
96
     *
97
     * @param string $version
98
     * @return Software
99
     */
100
    public function setVersion($version)
101
    {
102
        $this->version = $version;
103
104
        return $this;
105
    }
106
107
    /**
108
     * Get version
109
     *
110
     * @return string
111
     */
112
    public function getVersion()
113
    {
114
        return $this->version;
115
    }
116
117
    /**
118
     * Set os
119
     *
120
     * @param string $os
121
     *
122
     * @return Software
123
     */
124
    public function setOs($os)
125
    {
126
        $this->os = $os;
127
128
        return $this;
129
    }
130
131
    /**
132
     * Get os
133
     *
134
     * @return string
135
     */
136
    public function getOs()
137
    {
138
        return $this->os;
139
    }
140
141
}
142