Test Failed
Push — zf3-version ( 0397c2...c5fe3e )
by Diego
11:09
created

Activity::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Api\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Api\Entity\Sector;
7
8
/**
9
 * Activity
10
 *
11
 * @ORM\Table(name="activity", indexes={@ORM\Index(name="fk_actividad_sector1_idx", columns={"sector_id"})})
12
 * @ORM\Entity
13
 */
14
class Activity
15
{
16
    /**
17
     * @var integer
18
     *
19
     * @ORM\Column(name="id", type="integer", nullable=false)
20
     * @ORM\Id
21
     * @ORM\GeneratedValue(strategy="IDENTITY")
22
     */
23
    private $id;
24
25
    /**
26
     * @var string
27
     *
28
     * @ORM\Column(name="name", type="string", length=255, nullable=true)
29
     */
30
    private $name;
31
32
    /**
33
     * @var \Sector
34
     *
35
     * @ORM\ManyToOne(targetEntity="Sector")
36
     * @ORM\JoinColumns({
37
     *   @ORM\JoinColumn(name="sector_id", referencedColumnName="id")
38
     * })
39
     */
40
    private $sector;
41
42
43
44
45
    /**
46
     * Gets the value of id.
47
     *
48
     * @return integer
49
     */
50
    public function getId()
51
    {
52
        return $this->id;
53
    }
54
55
    /**
56
     * Gets the value of name.
57
     *
58
     * @return string
59
     */
60
    public function getName()
61
    {
62
        return $this->name;
63
    }
64
65
    /**
66
     * Sets the value of name.
67
     *
68
     * @param string $name the name
69
     *
70
     * @return self
71
     */
72
    public function setName($name)
73
    {
74
        $this->name = $name;
75
76
        return $this;
77
    }
78
79
    /**
80
     * Gets the }).
81
     *
82
     * @return \Sector
83
     */
84
    public function getSector()
85
    {
86
        return $this->sector;
87
    }
88
89
    /**
90
     * Sets the }).
91
     *
92
     * @param \Sector $sector the sector
93
     *
94
     * @return self
95
     */
96
    public function setSector(Sector $sector)
97
    {
98
        $this->sector = $sector;
0 ignored issues
show
Documentation Bug introduced by
It seems like $sector of type object<Api\Entity\Sector> is incompatible with the declared type object<Sector> of property $sector.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
99
100
        return $this;
101
    }
102
}
103
104