Passed
Pull Request — master (#6843)
by Luís
19:24 queued 01:03
created

TreeWalkerAdapter::walkSelectExpression()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 1
dl 0
loc 2
ccs 0
cts 1
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/*
3
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14
 *
15
 * This software consists of voluntary contributions made by many individuals
16
 * and is licensed under the MIT license. For more information, see
17
 * <http://www.doctrine-project.org>.
18
 */
19
20
namespace Doctrine\ORM\Query;
21
22
/**
23
 * An adapter implementation of the TreeWalker interface. The methods in this class
24
 * are empty. This class exists as convenience for creating tree walkers.
25
 *
26
 * @author Roman Borschel <[email protected]>
27
 * @since 2.0
28
 */
29
abstract class TreeWalkerAdapter implements TreeWalker
30
{
31
    /**
32
     * The original Query.
33
     *
34
     * @var \Doctrine\ORM\AbstractQuery
35
     */
36
    private $_query;
37
38
    /**
39
     * The ParserResult of the original query that was produced by the Parser.
40
     *
41
     * @var \Doctrine\ORM\Query\ParserResult
42
     */
43
    private $_parserResult;
44
45
    /**
46
     * The query components of the original query (the "symbol table") that was produced by the Parser.
47
     *
48
     * @var array
49
     */
50
    private $_queryComponents;
51
52
    /**
53
     * {@inheritdoc}
54
     */
55 178
    public function __construct($query, $parserResult, array $queryComponents)
56
    {
57 178
        $this->_query = $query;
58 178
        $this->_parserResult = $parserResult;
59 178
        $this->_queryComponents = $queryComponents;
60 178
    }
61
62
    /**
63
     * {@inheritdoc}
64
     */
65 89
    public function getQueryComponents()
66
    {
67 89
        return $this->_queryComponents;
68
    }
69
70
    /**
71
     * {@inheritdoc}
72
     */
73 2 View Code Duplication
    public function setQueryComponent($dqlAlias, array $queryComponent)
74
    {
75 2
        $requiredKeys = ['metadata', 'parent', 'relation', 'map', 'nestingLevel', 'token'];
76
77 2
        if (array_diff($requiredKeys, array_keys($queryComponent))) {
78
            throw QueryException::invalidQueryComponent($dqlAlias);
79
        }
80
81 2
        $this->_queryComponents[$dqlAlias] = $queryComponent;
82 2
    }
83
84
    /**
85
     * @return array
86
     */
87 86
    protected function _getQueryComponents()
88
    {
89 86
        return $this->_queryComponents;
90
    }
91
92
    /**
93
     * Retrieves the Query Instance responsible for the current walkers execution.
94
     *
95
     * @return \Doctrine\ORM\AbstractQuery
96
     */
97 84
    protected function _getQuery()
98
    {
99 84
        return $this->_query;
100
    }
101
102
    /**
103
     * Retrieves the ParserResult.
104
     *
105
     * @return \Doctrine\ORM\Query\ParserResult
106
     */
107
    protected function _getParserResult()
108
    {
109
        return $this->_parserResult;
110
    }
111
112
    /**
113
     * {@inheritdoc}
114
     */
115
    public function walkSelectStatement(AST\SelectStatement $AST)
116
    {
117
    }
118
119
    /**
120
     * {@inheritdoc}
121
     */
122
    public function walkSelectClause($selectClause)
123
    {
124
    }
125
126
    /**
127
     * {@inheritdoc}
128
     */
129
    public function walkFromClause($fromClause)
130
    {
131
    }
132
133
    /**
134
     * {@inheritdoc}
135
     */
136
    public function walkFunction($function)
137
    {
138
    }
139
140
    /**
141
     * {@inheritdoc}
142
     */
143
    public function walkOrderByClause($orderByClause)
144
    {
145
    }
146
147
    /**
148
     * {@inheritdoc}
149
     */
150
    public function walkOrderByItem($orderByItem)
151
    {
152
    }
153
154
    /**
155
     * {@inheritdoc}
156
     */
157
    public function walkHavingClause($havingClause)
158
    {
159
    }
160
161
    /**
162
     * {@inheritdoc}
163
     */
164
    public function walkJoin($join)
165
    {
166
    }
167
168
    /**
169
     * {@inheritdoc}
170
     */
171
    public function walkSelectExpression($selectExpression)
172
    {
173
    }
174
175
    /**
176
     * {@inheritdoc}
177
     */
178
    public function walkQuantifiedExpression($qExpr)
179
    {
180
    }
181
182
    /**
183
     * {@inheritdoc}
184
     */
185
    public function walkSubselect($subselect)
186
    {
187
    }
188
189
    /**
190
     * {@inheritdoc}
191
     */
192
    public function walkSubselectFromClause($subselectFromClause)
193
    {
194
    }
195
196
    /**
197
     * {@inheritdoc}
198
     */
199
    public function walkSimpleSelectClause($simpleSelectClause)
200
    {
201
    }
202
203
    /**
204
     * {@inheritdoc}
205
     */
206
    public function walkSimpleSelectExpression($simpleSelectExpression)
207
    {
208
    }
209
210
    /**
211
     * {@inheritdoc}
212
     */
213
    public function walkAggregateExpression($aggExpression)
214
    {
215
    }
216
217
    /**
218
     * {@inheritdoc}
219
     */
220
    public function walkGroupByClause($groupByClause)
221
    {
222
    }
223
224
    /**
225
     * {@inheritdoc}
226
     */
227
    public function walkGroupByItem($groupByItem)
228
    {
229
    }
230
231
    /**
232
     * {@inheritdoc}
233
     */
234
    public function walkUpdateStatement(AST\UpdateStatement $AST)
235
    {
236
    }
237
238
    /**
239
     * {@inheritdoc}
240
     */
241
    public function walkDeleteStatement(AST\DeleteStatement $AST)
242
    {
243
    }
244
245
    /**
246
     * {@inheritdoc}
247
     */
248
    public function walkDeleteClause(AST\DeleteClause $deleteClause)
249
    {
250
    }
251
252
    /**
253
     * {@inheritdoc}
254
     */
255
    public function walkUpdateClause($updateClause)
256
    {
257
    }
258
259
    /**
260
     * {@inheritdoc}
261
     */
262
    public function walkUpdateItem($updateItem)
263
    {
264
    }
265
266
    /**
267
     * {@inheritdoc}
268
     */
269
    public function walkWhereClause($whereClause)
270
    {
271
    }
272
273
    /**
274
     * {@inheritdoc}
275
     */
276
    public function walkConditionalExpression($condExpr)
277
    {
278
    }
279
280
    /**
281
     * {@inheritdoc}
282
     */
283
    public function walkConditionalTerm($condTerm)
284
    {
285
    }
286
287
    /**
288
     * {@inheritdoc}
289
     */
290
    public function walkConditionalFactor($factor)
291
    {
292
    }
293
294
    /**
295
     * {@inheritdoc}
296
     */
297
    public function walkConditionalPrimary($primary)
298
    {
299
    }
300
301
    /**
302
     * {@inheritdoc}
303
     */
304
    public function walkExistsExpression($existsExpr)
305
    {
306
    }
307
308
    /**
309
     * {@inheritdoc}
310
     */
311
    public function walkCollectionMemberExpression($collMemberExpr)
312
    {
313
    }
314
315
    /**
316
     * {@inheritdoc}
317
     */
318
    public function walkEmptyCollectionComparisonExpression($emptyCollCompExpr)
319
    {
320
    }
321
322
    /**
323
     * {@inheritdoc}
324
     */
325
    public function walkNullComparisonExpression($nullCompExpr)
326
    {
327
    }
328
329
    /**
330
     * {@inheritdoc}
331
     */
332
    public function walkInExpression($inExpr)
333
    {
334
    }
335
336
    /**
337
     * {@inheritdoc}
338
     */
339
    public function walkInstanceOfExpression($instanceOfExpr)
340
    {
341
    }
342
343
    /**
344
     * {@inheritdoc}
345
     */
346
    public function walkLiteral($literal)
347
    {
348
    }
349
350
    /**
351
     * {@inheritdoc}
352
     */
353
    public function walkBetweenExpression($betweenExpr)
354
    {
355
    }
356
357
    /**
358
     * {@inheritdoc}
359
     */
360
    public function walkLikeExpression($likeExpr)
361
    {
362
    }
363
364
    /**
365
     * {@inheritdoc}
366
     */
367
    public function walkStateFieldPathExpression($stateFieldPathExpression)
368
    {
369
    }
370
371
    /**
372
     * {@inheritdoc}
373
     */
374
    public function walkComparisonExpression($compExpr)
375
    {
376
    }
377
378
    /**
379
     * {@inheritdoc}
380
     */
381
    public function walkInputParameter($inputParam)
382
    {
383
    }
384
385
    /**
386
     * {@inheritdoc}
387
     */
388
    public function walkArithmeticExpression($arithmeticExpr)
389
    {
390
    }
391
392
    /**
393
     * {@inheritdoc}
394
     */
395
    public function walkArithmeticTerm($term)
396
    {
397
    }
398
399
    /**
400
     * {@inheritdoc}
401
     */
402
    public function walkStringPrimary($stringPrimary)
403
    {
404
    }
405
406
    /**
407
     * {@inheritdoc}
408
     */
409
    public function walkArithmeticFactor($factor)
410
    {
411
    }
412
413
    /**
414
     * {@inheritdoc}
415
     */
416
    public function walkSimpleArithmeticExpression($simpleArithmeticExpr)
417
    {
418
    }
419
420
    /**
421
     * {@inheritdoc}
422
     */
423
    public function walkPathExpression($pathExpr)
424
    {
425
    }
426
427
    /**
428
     * {@inheritdoc}
429
     */
430
    public function walkResultVariable($resultVariable)
431
    {
432
    }
433
434
    /**
435
     * {@inheritdoc}
436
     */
437
    public function getExecutor($AST)
438
    {
439
    }
440
}
441