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 | |||
7 | /** |
||
8 | * AnalyticsSegment |
||
9 | * |
||
10 | * @ORM\Table(name="kuma_analytics_segment") |
||
11 | * @ORM\Entity(repositoryClass="Kunstmaan\DashboardBundle\Repository\AnalyticsSegmentRepository") |
||
12 | */ |
||
13 | class AnalyticsSegment extends \Kunstmaan\AdminBundle\Entity\AbstractEntity |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | * |
||
18 | * @ORM\Column(name="name", type="string", length=255) |
||
19 | */ |
||
20 | private $name; |
||
21 | |||
22 | /** |
||
23 | * @var string |
||
24 | * |
||
25 | * @ORM\Column(name="query", type="string", length=1000) |
||
26 | */ |
||
27 | private $query; |
||
28 | |||
29 | /** |
||
30 | * @ORM\ManyToOne(targetEntity="AnalyticsConfig", inversedBy="segments") |
||
31 | * @ORM\JoinColumn(name="config", referencedColumnName="id") |
||
32 | */ |
||
33 | private $config; |
||
34 | |||
35 | /** |
||
36 | * @ORM\OneToMany(targetEntity="AnalyticsOverview", mappedBy="segment", cascade={"persist", "remove"}) |
||
37 | */ |
||
38 | private $overviews; |
||
39 | |||
40 | /** |
||
41 | * Set name |
||
42 | * |
||
43 | * @param string $name |
||
44 | * |
||
45 | * @return AnalyticsSegment |
||
46 | */ |
||
47 | 1 | public function setName($name) |
|
48 | { |
||
49 | 1 | $this->name = $name; |
|
50 | |||
51 | 1 | return $this; |
|
52 | } |
||
53 | |||
54 | /** |
||
55 | * Get name |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | 1 | public function getName() |
|
60 | { |
||
61 | 1 | return $this->name; |
|
62 | } |
||
63 | |||
64 | /** |
||
65 | * Set query |
||
66 | * |
||
67 | * @param string $query |
||
68 | * |
||
69 | * @return AnalyticsSegment |
||
70 | */ |
||
71 | 1 | public function setQuery($query) |
|
72 | { |
||
73 | 1 | $this->query = $query; |
|
74 | |||
75 | 1 | return $this; |
|
76 | } |
||
77 | |||
78 | /** |
||
79 | * Get query |
||
80 | * |
||
81 | * @return string |
||
82 | */ |
||
83 | 1 | public function getQuery() |
|
84 | { |
||
85 | 1 | return $this->query; |
|
86 | } |
||
87 | |||
88 | /** |
||
89 | * Get config |
||
90 | * |
||
91 | * @return int |
||
92 | */ |
||
93 | 1 | public function getConfig() |
|
94 | { |
||
95 | 1 | return $this->config; |
|
96 | } |
||
97 | |||
98 | /** |
||
99 | * Set config |
||
100 | * |
||
101 | * @param int $config |
||
102 | * |
||
103 | * @return AnalyticsTopReferrals |
||
0 ignored issues
–
show
|
|||
104 | */ |
||
105 | 1 | public function setConfig($config) |
|
106 | { |
||
107 | 1 | $this->config = $config; |
|
108 | |||
109 | 1 | return $this; |
|
110 | } |
||
111 | |||
112 | /** |
||
113 | * Set overviews |
||
114 | * |
||
115 | * @param array $overviews |
||
116 | * |
||
117 | * @return $this |
||
118 | */ |
||
119 | 1 | public function setoverviews($overviews) |
|
120 | { |
||
121 | 1 | $this->overviews = $overviews; |
|
122 | |||
123 | 1 | return $this; |
|
124 | } |
||
125 | |||
126 | /** |
||
127 | * Get overviews |
||
128 | * |
||
129 | * @return AnalyticsGoal[] |
||
130 | */ |
||
131 | 1 | public function getOverviews() |
|
132 | { |
||
133 | 1 | return $this->overviews; |
|
134 | } |
||
135 | } |
||
136 |
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.