1 | <?php |
||
14 | class AnalyticsOverview extends AbstractEntity |
||
15 | { |
||
16 | /** |
||
17 | * @var AnalyticsConfig |
||
18 | * |
||
19 | * @ORM\ManyToOne(targetEntity="AnalyticsConfig", inversedBy="overviews") |
||
20 | * @ORM\JoinColumn(name="config_id", referencedColumnName="id") |
||
21 | */ |
||
22 | private $config; |
||
23 | |||
24 | /** |
||
25 | * @var AnalyticsSegment |
||
26 | * |
||
27 | * @ORM\ManyToOne(targetEntity="AnalyticsSegment", inversedBy="overviews") |
||
28 | * @ORM\JoinColumn(name="segment_id", referencedColumnName="id", nullable=true) |
||
29 | */ |
||
30 | private $segment; |
||
31 | |||
32 | /** |
||
33 | * @ORM\OneToMany(targetEntity="AnalyticsGoal", mappedBy="overview", cascade={"persist", "remove"}) |
||
34 | * @ORM\OrderBy({"name" = "ASC"}) |
||
35 | */ |
||
36 | private $goals; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | * |
||
41 | * @ORM\Column(name="title", type="string", length=255) |
||
42 | */ |
||
43 | private $title; |
||
44 | |||
45 | /** |
||
46 | * @var integer |
||
47 | * |
||
48 | * @ORM\Column(name="timespan", type="integer") |
||
49 | */ |
||
50 | private $timespan; |
||
51 | |||
52 | /** |
||
53 | * @var integer |
||
54 | * |
||
55 | * @ORM\Column(name="start_days_ago", type="integer") |
||
56 | */ |
||
57 | private $startOffset = 0; |
||
58 | |||
59 | /** |
||
60 | * @var boolean |
||
61 | * |
||
62 | * @ORM\Column(name="use_year", type="boolean") |
||
63 | */ |
||
64 | private $useYear = false; |
||
65 | |||
66 | /** |
||
67 | * @var integer |
||
68 | * |
||
69 | * @ORM\Column(name="sessions", type="integer") |
||
70 | */ |
||
71 | private $sessions = 0; |
||
72 | |||
73 | /** |
||
74 | * @var integer |
||
75 | * |
||
76 | * @ORM\Column(name="users", type="integer") |
||
77 | */ |
||
78 | private $users = 0; |
||
79 | |||
80 | /** |
||
81 | * @var integer |
||
82 | * |
||
83 | * @ORM\Column(name="returning_users", type="integer") |
||
84 | */ |
||
85 | private $returningUsers = 0; |
||
86 | |||
87 | /** |
||
88 | * @var float |
||
89 | * |
||
90 | * @ORM\Column(name="new_users", type="float") |
||
91 | */ |
||
92 | private $newUsers = 0; |
||
93 | |||
94 | /** |
||
95 | * @var integer |
||
96 | * |
||
97 | * @ORM\Column(name="pageviews", type="integer") |
||
98 | */ |
||
99 | private $pageViews = 0; |
||
100 | |||
101 | /** |
||
102 | * @var float |
||
103 | * |
||
104 | * @ORM\Column(name="pages_per_session", type="float") |
||
105 | */ |
||
106 | private $pagesPerSession = 0; |
||
107 | |||
108 | /** |
||
109 | * @var integer |
||
110 | * |
||
111 | * @ORM\Column(name="chart_data_max_value", type="integer") |
||
112 | */ |
||
113 | private $chartDataMaxValue = 0; |
||
114 | |||
115 | /** |
||
116 | * @var string |
||
117 | * |
||
118 | * @ORM\Column(name="avg_session_duration", type="string") |
||
119 | */ |
||
120 | private $avgSessionDuration = 0; |
||
121 | |||
122 | /** |
||
123 | * @var string |
||
124 | * |
||
125 | * @ORM\Column(name="chart_data", type="text") |
||
126 | */ |
||
127 | private $chartData = ''; |
||
128 | |||
129 | /** |
||
130 | * Get percentage of returning users |
||
131 | * |
||
132 | * @return int |
||
|
|||
133 | */ |
||
134 | public function getReturningUsersPercentage() |
||
138 | |||
139 | /** |
||
140 | * Get percentage of new users |
||
141 | * |
||
142 | * @return int |
||
143 | */ |
||
144 | public function getNewUsersPercentage() |
||
148 | |||
149 | /** |
||
150 | * @return AnalyticsConfig |
||
151 | */ |
||
152 | public function getConfig() |
||
156 | |||
157 | /** |
||
158 | * @param AnalyticsConfig $config |
||
159 | */ |
||
160 | public function setConfig($config) |
||
164 | |||
165 | /** |
||
166 | * @return AnalyticsSegment |
||
167 | */ |
||
168 | public function getSegment() |
||
172 | |||
173 | /** |
||
174 | * @param AnalyticsSegment $segment |
||
175 | */ |
||
176 | public function setSegment($segment) |
||
180 | |||
181 | /** |
||
182 | * Set goals |
||
183 | * |
||
184 | * @param array $goals |
||
185 | * |
||
186 | * @return $this |
||
187 | */ |
||
188 | public function setGoals($goals) |
||
194 | |||
195 | /** |
||
196 | * Get goals |
||
197 | * |
||
198 | * @return AnalyticsGoal[] |
||
199 | */ |
||
200 | public function getGoals() |
||
204 | |||
205 | /** |
||
206 | * @return array |
||
207 | */ |
||
208 | public function getActiveGoals() |
||
219 | |||
220 | /** |
||
221 | * @return string |
||
222 | */ |
||
223 | public function getTitle() |
||
227 | |||
228 | /** |
||
229 | * @param string $title |
||
230 | */ |
||
231 | public function setTitle($title) |
||
235 | |||
236 | /** |
||
237 | * @return int |
||
238 | */ |
||
239 | public function getTimespan() |
||
243 | |||
244 | /** |
||
245 | * @param int $timespan |
||
246 | */ |
||
247 | public function setTimespan($timespan) |
||
251 | |||
252 | /** |
||
253 | * @return int |
||
254 | */ |
||
255 | public function getStartOffset() |
||
259 | |||
260 | /** |
||
261 | * @param int $startOffset |
||
262 | */ |
||
263 | public function setStartOffset($startOffset) |
||
267 | |||
268 | /** |
||
269 | * @return bool |
||
270 | */ |
||
271 | public function getUseYear() |
||
275 | |||
276 | /** |
||
277 | * @param bool $useYear |
||
278 | */ |
||
279 | public function setUseYear($useYear) |
||
283 | |||
284 | /** |
||
285 | * @return int |
||
286 | */ |
||
287 | public function getSessions() |
||
291 | |||
292 | /** |
||
293 | * @param int $sessions |
||
294 | */ |
||
295 | public function setSessions($sessions) |
||
299 | |||
300 | /** |
||
301 | * @return int |
||
302 | */ |
||
303 | public function getUsers() |
||
307 | |||
308 | /** |
||
309 | * @param int $users |
||
310 | */ |
||
311 | public function setUsers($users) |
||
315 | |||
316 | /** |
||
317 | * @return int |
||
318 | */ |
||
319 | public function getReturningUsers() |
||
323 | |||
324 | /** |
||
325 | * @param int $returningUsers |
||
326 | */ |
||
327 | public function setReturningUsers($returningUsers) |
||
331 | |||
332 | /** |
||
333 | * @return float |
||
334 | */ |
||
335 | public function getNewUsers() |
||
339 | |||
340 | /** |
||
341 | * @param float $newUsers |
||
342 | */ |
||
343 | public function setNewUsers($newUsers) |
||
347 | |||
348 | /** |
||
349 | * @return int |
||
350 | */ |
||
351 | public function getPageViews() |
||
355 | |||
356 | /** |
||
357 | * @param int $pageViews |
||
358 | */ |
||
359 | public function setPageViews($pageViews) |
||
363 | |||
364 | /** |
||
365 | * @return float |
||
366 | */ |
||
367 | public function getPagesPerSession() |
||
371 | |||
372 | /** |
||
373 | * @param float $pagesPerSession |
||
374 | */ |
||
375 | public function setPagesPerSession($pagesPerSession) |
||
379 | |||
380 | /** |
||
381 | * @return int |
||
382 | */ |
||
383 | public function getChartDataMaxValue() |
||
387 | |||
388 | /** |
||
389 | * @param int $chartDataMaxValue |
||
390 | */ |
||
391 | public function setChartDataMaxValue($chartDataMaxValue) |
||
395 | |||
396 | /** |
||
397 | * @return string |
||
398 | */ |
||
399 | public function getAvgSessionDuration() |
||
403 | |||
404 | /** |
||
405 | * @param string $avgSessionDuration |
||
406 | */ |
||
407 | public function setAvgSessionDuration($avgSessionDuration) |
||
411 | |||
412 | /** |
||
413 | * @return string |
||
414 | */ |
||
415 | public function getChartData() |
||
419 | |||
420 | /** |
||
421 | * @param string $chartData |
||
422 | */ |
||
423 | public function setChartData($chartData) |
||
427 | } |
||
428 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.