Completed
Push — master ( e79dfa...ffecda )
by Benjamin
02:16
created

Group   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 65
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 65
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __toString() 0 4 1
A getId() 0 4 1
A getDisplay() 0 4 1
A setDisplay() 0 6 1
1
<?php
2
3
namespace Alpixel\Bundle\UserBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use FOS\UserBundle\Model\Group as BaseGroup;
7
8
/**
9
 * Group.
10
 *
11
 * @ORM\Table(name="account_group")
12
 * @ORM\Entity
13
 */
14
class Group extends BaseGroup
15
{
16
    /**
17
     * @var integer
18
     *
19
     * @ORM\Column(name="id", type="integer", nullable=false)
20
     * @ORM\Id
21
     * @ORM\GeneratedValue(strategy="AUTO")
22
     */
23
    protected $id;
24
25
    /**
26
     * @var boolean
27
     *
28
     * @ORM\Column(name="display", type="boolean", nullable=false)
29
     */
30
    protected $display;
31
32
    /**
33
     * Constructor.
34
     */
35
    public function __construct()
36
    {
37
        $this->upload = new \Doctrine\Common\Collections\ArrayCollection();
0 ignored issues
show
Bug introduced by
The property upload does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
38
    }
39
40
    public function __toString()
41
    {
42
        return $this->name;
43
    }
44
45
    /**
46
     * Get id.
47
     *
48
     * @return integer
49
     */
50
    public function getId()
51
    {
52
        return $this->id;
53
    }
54
55
    /**
56
     * Gets the value of display.
57
     *
58
     * @return boolean
59
     */
60
    public function getDisplay()
61
    {
62
        return $this->display;
63
    }
64
65
    /**
66
     * Sets the value of display.
67
     *
68
     * @param boolean $display the display
69
     *
70
     * @return self
71
     */
72
    public function setDisplay($display)
73
    {
74
        $this->display = $display;
75
76
        return $this;
77
    }
78
}
79