1 | <?php |
||
23 | class ManyToManyLoader extends RelationLoader |
||
24 | { |
||
25 | use WhereTrait; |
||
26 | |||
27 | /** |
||
28 | * Default set of relation options. Child implementation might defined their of default options. |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $options = [ |
||
33 | 'method' => self::POSTLOAD, |
||
34 | 'minify' => true, |
||
35 | 'alias' => null, |
||
36 | 'pivotAlias' => null, |
||
37 | 'using' => null, |
||
38 | 'where' => null, |
||
39 | ]; |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | protected function configureQuery(SelectQuery $query, array $outerKeys = []): SelectQuery |
||
78 | |||
79 | /** |
||
80 | * Set columns into SelectQuery. |
||
81 | * |
||
82 | * @param SelectQuery $query |
||
83 | * @param bool $minify Minify column names (will work in case when query parsed in |
||
84 | * FETCH_NUM mode). |
||
85 | * @param string $prefix Prefix to be added for each column name. |
||
86 | * @param bool $overwrite When set to true existed columns will be removed. |
||
87 | */ |
||
88 | protected function mountColumns( |
||
117 | |||
118 | /** |
||
119 | * {@inheritdoc} |
||
120 | */ |
||
121 | protected function initNode(): AbstractNode |
||
133 | |||
134 | /** |
||
135 | * Pivot table name. |
||
136 | * |
||
137 | * @return string |
||
138 | */ |
||
139 | protected function pivotTable(): string |
||
143 | |||
144 | /** |
||
145 | * Pivot table alias, depends on relation table alias. |
||
146 | * |
||
147 | * @return string |
||
148 | */ |
||
149 | protected function pivotAlias(): string |
||
157 | |||
158 | /** |
||
159 | * @return array |
||
160 | */ |
||
161 | protected function pivotColumns(): array |
||
165 | |||
166 | /** |
||
167 | * Key related to pivot table. Must include pivot table alias. |
||
168 | * |
||
169 | * @see pivotKey() |
||
170 | * |
||
171 | * @param string $key |
||
172 | * |
||
173 | * @return null|string |
||
174 | */ |
||
175 | protected function pivotKey(string $key) |
||
183 | } |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.