Completed
Push — master ( 1de9b7...830752 )
by Kristof
38:46 queued 24:09
created

Kunstmaan/DashboardBundle/Entity/AnalyticsGoal.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Kunstmaan\DashboardBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use Kunstmaan\AdminBundle\Entity\AbstractEntity;
7
8
/**
9
 * AnalyticsGoal
10
 *
11
 * @ORM\Table(name="kuma_analytics_goal")
12
 * @ORM\Entity(repositoryClass="Kunstmaan\DashboardBundle\Repository\AnalyticsGoalRepository")
13
 */
14
class AnalyticsGoal extends AbstractEntity
15
{
16
    /**
17
     * @ORM\ManyToOne(targetEntity="AnalyticsOverview", inversedBy="goals")
18
     * @ORM\JoinColumn(name="overview_id", referencedColumnName="id")
19
     */
20
    private $overview;
21
22
    /**
23
     * @var int
24
     *
25
     * @ORM\Column(name="position", type="integer")
26
     */
27
    private $position;
28
29
    /**
30
     * @var string
31
     *
32
     * @ORM\Column(name="name", type="string", length=255)
33
     */
34
    private $name;
35
36
    /**
37
     * @var int
38
     *
39
     * @ORM\Column(name="visits", type="integer")
40
     */
41
    private $visits;
42
43
    /**
44
     * @var array
45
     *
46
     * @ORM\Column(name="chart_data", type="text")
47
     */
48
    private $chartData = '';
49
50
    /**
51
     * Get overview
52
     *
53
     * @return int
54
     */
55
    public function getOverview()
56
    {
57
        return $this->overview;
58
    }
59
60
    /**
61
     * Set overview
62
     *
63
     * @param int $overview
64
     *
65
     * @return $this
66
     */
67
    public function setOverview($overview)
68
    {
69
        $this->overview = $overview;
70
71
        return $this;
72
    }
73
74
    /**
75
     * Set position
76
     *
77
     * @param int $position
78
     *
79
     * @return AnalyticsGoal
80
     */
81
    public function setPosition($position)
82
    {
83
        $this->position = $position;
84
85
        return $this;
86
    }
87
88
    /**
89
     * Get position
90
     *
91
     * @return int
92
     */
93
    public function getPosition()
94
    {
95
        return $this->position;
96
    }
97
98
    /**
99
     * Set name
100
     *
101
     * @param string $name
102
     *
103
     * @return AnalyticsGoal
104
     */
105
    public function setName($name)
106
    {
107
        $this->name = $name;
108
109
        return $this;
110
    }
111
112
    /**
113
     * Get name
114
     *
115
     * @return string
116
     */
117
    public function getName()
118
    {
119
        return $this->name;
120
    }
121
122
    /**
123
     * Set visits
124
     *
125
     * @param int $visits
126
     *
127
     * @return AnalyticsGoal
128
     */
129
    public function setVisits($visits)
130
    {
131
        $this->visits = $visits;
132
133
        return $this;
134
    }
135
136
    /**
137
     * Get visits
138
     *
139
     * @return int
140
     */
141
    public function getVisits()
142
    {
143
        return number_format($this->visits);
144
    }
145
146
    /**
147
     * Set chartData
148
     *
149
     * @param string $chartData
150
     *
151
     * @return AnalyticsGoal
152
     */
153
    public function setChartData($chartData)
154
    {
155
        $this->chartData = $chartData;
0 ignored issues
show
Documentation Bug introduced by
It seems like $chartData of type string is incompatible with the declared type array of property $chartData.

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...
156
157
        return $this;
158
    }
159
160
    /**
161
     * Get chartData
162
     *
163
     * @return string
164
     */
165
    public function getChartData()
166
    {
167
        return $this->chartData;
168
    }
169
}
170