1 | <?php |
||
11 | abstract class AbstractTable |
||
12 | { |
||
13 | const CROSS_JOIN = 'CROSS JOIN'; |
||
14 | const LEFT_JOIN = 'LEFT JOIN'; |
||
15 | const INNER_JOIN = 'INNER JOIN'; |
||
16 | |||
17 | const ROOT_FROM = 1; |
||
18 | const ROOT_UPDATE = 2; |
||
19 | const ROOT_INSERT = 3; |
||
20 | |||
21 | /** |
||
22 | * @var QueryBuilder $qb |
||
23 | */ |
||
24 | private $qb; |
||
25 | |||
26 | /** |
||
27 | * @var string $tableAlias |
||
28 | */ |
||
29 | private $tableAlias; |
||
30 | |||
31 | /** |
||
32 | * @var string $joinType |
||
33 | */ |
||
34 | private $joinType; |
||
35 | |||
36 | /** |
||
37 | * @var int $root |
||
38 | */ |
||
39 | private $rootType; |
||
40 | |||
41 | /** |
||
42 | * @var string $joinOn |
||
43 | */ |
||
44 | private $joinOn; |
||
45 | |||
46 | /** |
||
47 | * @var bool $join |
||
48 | */ |
||
49 | private $join = false; |
||
50 | |||
51 | /** |
||
52 | * @param QueryBuilder $qb |
||
53 | */ |
||
54 | 27 | public function __construct(QueryBuilder $qb) |
|
58 | |||
59 | /** |
||
60 | * @return ReferenceManager |
||
|
|||
61 | */ |
||
62 | 17 | public function __toString() |
|
66 | |||
67 | /** |
||
68 | * @return string |
||
69 | */ |
||
70 | abstract public function getTableName(); |
||
71 | |||
72 | /** |
||
73 | * @return QueryBuilder |
||
74 | */ |
||
75 | 1 | public function getQueryBuilder() |
|
79 | |||
80 | /** |
||
81 | * @return string |
||
82 | */ |
||
83 | 25 | public function getAlias() |
|
87 | |||
88 | /** |
||
89 | * @param string $alias |
||
90 | * |
||
91 | * @return $this |
||
92 | */ |
||
93 | 8 | public function setAlias($alias) |
|
99 | |||
100 | /** |
||
101 | * @return bool |
||
102 | */ |
||
103 | 25 | public function isJoin() |
|
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | 3 | public function getJoinType() |
|
115 | |||
116 | /** |
||
117 | * @param string $joinType |
||
118 | * |
||
119 | * @return $this |
||
120 | */ |
||
121 | 3 | public function setJoinType($joinType) |
|
128 | |||
129 | /** |
||
130 | * @return bool |
||
131 | */ |
||
132 | 25 | public function isRoot() |
|
136 | |||
137 | /** |
||
138 | * @param int $rootType |
||
139 | * |
||
140 | * @return $this |
||
141 | */ |
||
142 | 27 | public function setRootType($rootType) |
|
148 | |||
149 | /** |
||
150 | * @return int |
||
151 | */ |
||
152 | 25 | public function getRootType() |
|
156 | |||
157 | /** |
||
158 | * @return string |
||
159 | */ |
||
160 | 17 | public function getAliasOrName() |
|
164 | |||
165 | /** |
||
166 | * @param string $clause |
||
167 | * |
||
168 | * @return $this |
||
169 | */ |
||
170 | 5 | public function addSelect($clause) |
|
176 | |||
177 | /** |
||
178 | * @param string $clause |
||
179 | * |
||
180 | * @return $this |
||
181 | */ |
||
182 | 2 | public function joinOn($clause) |
|
188 | |||
189 | /** |
||
190 | * @return string |
||
191 | */ |
||
192 | 25 | public function getJoinOn() |
|
196 | |||
197 | /** |
||
198 | * @param string $name |
||
199 | * |
||
200 | * @return string |
||
201 | */ |
||
202 | 17 | public function column($name) |
|
206 | } |
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.