Passed
Push — master ( 5197c9...313b01 )
by Sébastien
04:05 queued 15s
created

Walker::pushAll()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Bdf\Prime\Query\Pagination;
4
5
use BadMethodCallException;
6
use Bdf\Prime\Exception\PrimeException;
7
use Bdf\Prime\PrimeSerializable;
8
use Bdf\Prime\Query\Contract\ReadOperation;
9
use Bdf\Prime\Query\Pagination\WalkStrategy\PaginationWalkStrategy;
10
use Bdf\Prime\Query\Pagination\WalkStrategy\WalkCursor;
11
use Bdf\Prime\Query\Pagination\WalkStrategy\WalkStrategyInterface;
12
use Bdf\Prime\Query\ReadCommandInterface;
13
use LogicException;
14
15
/**
16
 * Query Walker
17
 * 
18
 * Permet de parcourir des collections contenant de gros volume d'entités.
19
 * Le parcourt se fait par paquet d'entités définis par la limit de la query
20
 * Une fois la limite atteinte, la classe lance la requête suivante
0 ignored issues
show
introduced by
Doc comment long description must end with a full stop
Loading history...
21
 * 
22
 * Attention, le walker ne gère pas les objects collection
23
 *
24
 * @author  Seb
0 ignored issues
show
Coding Style introduced by
Content of the @author tag must be in the form "Display Name <[email protected]>"
Loading history...
Coding Style introduced by
The tag in position 1 should be the @package tag
Loading history...
introduced by
Tag value indented incorrectly; expected 1 space but found 2
Loading history...
Coding Style Documentation introduced by
@author tag is not allowed in class comment
Loading history...
25
 * @package Bdf\Prime\Query\Pagination
0 ignored issues
show
Coding Style Documentation introduced by
@package tag is not allowed in class comment
Loading history...
26
 */
27
class Walker extends PrimeSerializable implements \Iterator, PaginatorInterface
28
{
29
    const DEFAULT_PAGE  = 1;
30
    const DEFAULT_LIMIT = 150;
31
    
32
    /**
33
     * First page
34
     * 
35
     * @var int
0 ignored issues
show
Bug introduced by
Expected "integer" but found "int" for @var tag in member variable comment
Loading history...
36
     */
37
    protected $startPage;
38
39
    /**
40
     * The current offset
41
     *
42
     * @var int
0 ignored issues
show
Bug introduced by
Expected "integer" but found "int" for @var tag in member variable comment
Loading history...
43
     */
44
    protected $offset;
45
46
    /**
47
     * @var array|null
48
     */
49
    private $collection;
50
51
    /**
52
     * @var WalkStrategyInterface
53
     */
54
    private $strategy;
55
56
    /**
57
     * @var WalkCursor
58
     */
59
    private $cursor;
60
61
    /**
62
     * @var ReadCommandInterface
63
     */
64
    private $query;
65
66
    /**
67
     * @var int
0 ignored issues
show
Bug introduced by
Expected "integer" but found "int" for @var tag in member variable comment
Loading history...
68
     */
69
    private $page;
70
71
    /**
72
     * @var int
0 ignored issues
show
Bug introduced by
Expected "integer" but found "int" for @var tag in member variable comment
Loading history...
73
     */
74
    private $maxRows;
75
76
    /**
77
     * Create a query walker
78
     * 
79
     * @param ReadCommandInterface $query
80
     * @param int            $maxRows
0 ignored issues
show
Coding Style introduced by
Expected "integer" but found "int" for parameter type
Loading history...
81
     * @param int            $page
0 ignored issues
show
Coding Style introduced by
Expected "integer" but found "int" for parameter type
Loading history...
82
     */
83 27
    public function __construct(ReadCommandInterface $query, $maxRows = null, $page = null)
84
    {
85 27
        $this->query = $query;
86 27
        $this->page = 0;
87 27
        $this->maxRows = $maxRows ?: self::DEFAULT_LIMIT;
0 ignored issues
show
Coding Style introduced by
The value of a comparison must not be assigned to a variable
Loading history...
Coding Style introduced by
Inline shorthand IF statement requires brackets around comparison
Loading history...
88 27
        $this->startPage = $page ?: self::DEFAULT_PAGE;
0 ignored issues
show
Coding Style introduced by
The value of a comparison must not be assigned to a variable
Loading history...
Coding Style introduced by
Inline shorthand IF statement requires brackets around comparison
Loading history...
89 27
    }
90
91
    /**
92
     * Change the walk strategy
93
     *
94
     * @param WalkStrategyInterface $strategy
95
     *
96
     * @return Walker
97
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
98 21
    public function setStrategy(WalkStrategyInterface $strategy): self
99
    {
100 21
        if ($this->cursor !== null) {
101
            throw new LogicException('Cannot change walk strategy during walk');
102
        }
103
104 21
        $this->strategy = $strategy;
105
106 21
        return $this;
107
    }
108
109
    /**
110
     * Get the current active walk strategy
111
     *
112
     * @return WalkStrategyInterface
113
     */
114 24
    public function getStrategy(): WalkStrategyInterface
115
    {
116 24
        if ($this->strategy) {
117 17
            return $this->strategy;
118
        }
119
120 8
        return $this->strategy = new PaginationWalkStrategy();
0 ignored issues
show
Coding Style introduced by
Assignments must be the first block of code on a line
Loading history...
121
    }
122
123
    /**
124
     * Load the first page of collection
125
     *
126
     * @throws PrimeException
127
     */
128
    #[ReadOperation]
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% of this comment could be valid code. Did you maybe forget this after debugging?

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.

Loading history...
Coding Style introduced by
Perl-style comments are not allowed; use "// Comment" instead
Loading history...
Coding Style introduced by
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Loading history...
129 23
    public function load()
0 ignored issues
show
Coding Style introduced by
You must use "/**" style comments for a function comment
Loading history...
130
    {
131 23
        $this->page = $this->startPage;
132 23
        $this->cursor = $this->getStrategy()->initialize($this->query, $this->maxRows, $this->page);
133 20
        $this->loadCollection();
134 20
    }
135
136
    /**
137
     * @return ReadCommandInterface
138
     */
139 2
    public function query(): ReadCommandInterface
140
    {
141 2
        if ($this->cursor) {
142 1
            return $this->cursor->query;
143
        }
144
145 1
        return $this->query;
146
    }
147
148
    /**
149
     * {@inheritdoc}
150
     */
151
    public function collection()
152
    {
153
        return $this->collection;
154
    }
155
156
    /**
157
     * {@inheritdoc}
158
     */
159 5
    public function size()
160
    {
161 5
        return $this->query->paginationCount();
0 ignored issues
show
Bug introduced by
The method paginationCount() does not exist on Bdf\Prime\Query\ReadCommandInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Bdf\Prime\Query\Contract...\KeyValueQueryInterface or Bdf\Prime\Query\QueryInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

161
        return $this->query->/** @scrutinizer ignore-call */ paginationCount();
Loading history...
162
    }
163
164
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $attribute should have a doc-comment as per coding-style.
Loading history...
165
     * {@inheritdoc}
166
     */
167
    public function order($attribute = null)
168
    {
169
        $orders = $this->query()->getOrders();
0 ignored issues
show
Bug introduced by
The method getOrders() does not exist on Bdf\Prime\Query\ReadCommandInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Bdf\Prime\Query\Contract...\KeyValueQueryInterface or Bdf\Prime\Query\QueryInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

169
        $orders = $this->query()->/** @scrutinizer ignore-call */ getOrders();
Loading history...
170
171
        if ($attribute === null) {
172
            return $orders;
173
        }
174
175
        return isset($orders[$attribute]) ? $orders[$attribute] : null;
176
    }
177
178
    /**
179
     * {@inheritdoc}
180
     */
181 3
    public function limit()
182
    {
183 3
        return $this->cursor->query->getLimit();
0 ignored issues
show
Bug introduced by
The method getLimit() does not exist on Bdf\Prime\Query\ReadCommandInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Bdf\Prime\Query\Contract...\KeyValueQueryInterface or Bdf\Prime\Query\QueryInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

183
        return $this->cursor->query->/** @scrutinizer ignore-call */ getLimit();
Loading history...
184
    }
185
186
    /**
187
     * {@inheritdoc}
188
     */
189 1
    public function offset()
190
    {
191 1
        return $this->cursor->query->getOffset();
0 ignored issues
show
Bug introduced by
The method getOffset() does not exist on Bdf\Prime\Query\ReadCommandInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Bdf\Prime\Query\Contract...\KeyValueQueryInterface or Bdf\Prime\Query\QueryInterface. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

191
        return $this->cursor->query->/** @scrutinizer ignore-call */ getOffset();
Loading history...
192
    }
193
194
    /**
195
     * {@inheritdoc}
196
     */
197 3
    public function page()
198
    {
199 3
        return $this->page;
200
    }
201
202
    /**
203
     * {@inheritdoc}
204
     */
205 3
    public function pageMaxRows()
206
    {
207 3
        return $this->maxRows;
208
    }
209
210
    /**
211
     * {@inheritdoc}
212
     */
213 20
    protected function loadCollection()
214
    {
215 20
        $this->cursor = $this->strategy->next($this->cursor);
216 20
        $this->collection = $this->cursor->entities;
217
218
        // Test if the collection has numerical keys.
219
        // We have to add the offset to the numerical key.
220 20
        if (isset($this->collection[0])) {
221 18
            $this->offset = ($this->page - $this->startPage) * $this->maxRows;
0 ignored issues
show
Coding Style introduced by
Operation must be bracketed
Loading history...
222
        } else {
223 17
            $this->offset = null;
224
        }
225 20
    }
226
227
    /**
228
     * SPL - Iterator
229
     *
230
     * {@inheritdoc}
231
     */
232 16
    public function current()
233
    {
234 16
        return current($this->collection);
0 ignored issues
show
Bug introduced by
It seems like $this->collection can also be of type null; however, parameter $array of current() does only seem to accept array|object, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

234
        return current(/** @scrutinizer ignore-type */ $this->collection);
Loading history...
235
    }
236
    
237
    /**
238
     * SPL - Iterator
239
     *
240
     * {@inheritdoc}
241
     */
242 11
    public function key()
243
    {
244 11
        if ($this->offset !== null) {
245 10
            return $this->offset + key($this->collection);
0 ignored issues
show
Coding Style introduced by
Operation must be bracketed
Loading history...
Bug introduced by
It seems like $this->collection can also be of type null; however, parameter $array of key() does only seem to accept array|object, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

245
            return $this->offset + key(/** @scrutinizer ignore-type */ $this->collection);
Loading history...
246
        }
247
248 1
        return key($this->collection);
249
    }
250
    
251
    /**
252
     * SPL - Iterator
253
     *
254
     * {@inheritdoc}
255
     *
256
     * @throws PrimeException
257
     */
258
    #[ReadOperation]
0 ignored issues
show
Coding Style introduced by
Perl-style comments are not allowed; use "// Comment" instead
Loading history...
Coding Style introduced by
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Loading history...
Unused Code Comprehensibility introduced by
67% of this comment could be valid code. Did you maybe forget this after debugging?

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.

Loading history...
259 16
    public function next()
0 ignored issues
show
Coding Style introduced by
You must use "/**" style comments for a function comment
Loading history...
260
    {
261 16
        if (false === next($this->collection)) {
0 ignored issues
show
Bug introduced by
It seems like $this->collection can also be of type null; however, parameter $array of next() does only seem to accept array|object, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

261
        if (false === next(/** @scrutinizer ignore-type */ $this->collection)) {
Loading history...
262 16
            $this->page++;
263 16
            $this->loadCollection();
264
        }
265 16
    }
266
    
267
    /**
268
     * SPL - Iterator
269
     *
270
     * {@inheritdoc}
271
     */
272 16
    public function valid()
273
    {
274 16
        return false !== current($this->collection);
0 ignored issues
show
Bug introduced by
It seems like $this->collection can also be of type null; however, parameter $array of current() does only seem to accept array|object, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

274
        return false !== current(/** @scrutinizer ignore-type */ $this->collection);
Loading history...
275
    }
276
    
277
    /**
278
     * SPL - Iterator
279
     *
280
     * {@inheritdoc}
281
     *
282
     * @throws PrimeException
283
     */
284
    #[ReadOperation]
0 ignored issues
show
Coding Style introduced by
Perl-style comments are not allowed. Use "// Comment." or "/* comment */" instead.
Loading history...
Coding Style introduced by
Perl-style comments are not allowed; use "// Comment" instead
Loading history...
Unused Code Comprehensibility introduced by
67% of this comment could be valid code. Did you maybe forget this after debugging?

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.

Loading history...
285 19
    public function rewind()
0 ignored issues
show
Coding Style introduced by
You must use "/**" style comments for a function comment
Loading history...
286
    {
287 19
        if (($this->page == $this->startPage) && count($this->collection)) {
0 ignored issues
show
Bug introduced by
It seems like $this->collection can also be of type null; however, parameter $value of count() does only seem to accept Countable|array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

287
        if (($this->page == $this->startPage) && count(/** @scrutinizer ignore-type */ $this->collection)) {
Loading history...
288
            reset($this->collection);
0 ignored issues
show
Bug introduced by
It seems like $this->collection can also be of type null; however, parameter $array of reset() does only seem to accept array|object, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

288
            reset(/** @scrutinizer ignore-type */ $this->collection);
Loading history...
289
        } else {
290 19
            $this->load();
291
        }
292 16
    }
293
294
    /**
295
     * {@inheritdoc}
296
     */
297 3
    public function count()
298
    {
299 3
        return count($this->collection);
0 ignored issues
show
Bug introduced by
It seems like $this->collection can also be of type null; however, parameter $value of count() does only seem to accept Countable|array, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

299
        return count(/** @scrutinizer ignore-type */ $this->collection);
Loading history...
300
    }
301
302
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $items should have a doc-comment as per coding-style.
Loading history...
303
     * {@inheritdoc}
304
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
305
    public function pushAll(array $items)
306
    {
307
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
308
    }
309
310
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $item should have a doc-comment as per coding-style.
Loading history...
311
     * {@inheritdoc}
312
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
313
    public function push($item)
314
    {
315
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
316
    }
317
318
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $key should have a doc-comment as per coding-style.
Loading history...
Coding Style introduced by
Parameter $item should have a doc-comment as per coding-style.
Loading history...
319
     * {@inheritdoc}
320
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
321
    public function put($key, $item)
322
    {
323
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
324
    }
325
326
    /**
327
     * {@inheritdoc}
328
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
329
    public function all()
330
    {
331
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
332
    }
333
334
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $default should have a doc-comment as per coding-style.
Loading history...
Coding Style introduced by
Parameter $key should have a doc-comment as per coding-style.
Loading history...
335
     * {@inheritdoc}
336
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
337
    public function get($key, $default = null)
338
    {
339
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
340
    }
341
342
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $key should have a doc-comment as per coding-style.
Loading history...
343
     * {@inheritdoc}
344
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
345
    public function has($key)
346
    {
347
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
348
    }
349
350
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $key should have a doc-comment as per coding-style.
Loading history...
351
     * {@inheritdoc}
352
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
353
    public function remove($key)
354
    {
355
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
356
    }
357
358
    /**
359
     * {@inheritdoc}
360
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
361
    public function clear()
362
    {
363
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
364
    }
365
366
    /**
367
     * {@inheritdoc}
368
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
369
    public function keys()
370
    {
371
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
372
    }
373
374
    /**
375
     * {@inheritdoc}
376
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
377
    public function isEmpty()
378
    {
379
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
380
    }
381
382
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $callback should have a doc-comment as per coding-style.
Loading history...
383
     * {@inheritdoc}
384
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
385 1
    public function map($callback)
386
    {
387 1
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
388
    }
389
390
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $callback should have a doc-comment as per coding-style.
Loading history...
391
     * {@inheritdoc}
392
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
393
    public function filter($callback = null)
394
    {
395
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
396
    }
397
398
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $mode should have a doc-comment as per coding-style.
Loading history...
Coding Style introduced by
Parameter $groupBy should have a doc-comment as per coding-style.
Loading history...
399
     * {@inheritdoc}
400
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
401
    public function groupBy($groupBy, $mode = self::GROUPBY)
402
    {
403
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
404
    }
405
406
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $element should have a doc-comment as per coding-style.
Loading history...
407
     * {@inheritdoc}
408
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
409
    public function contains($element)
410
    {
411
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
412
    }
413
414
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $value should have a doc-comment as per coding-style.
Loading history...
Coding Style introduced by
Parameter $strict should have a doc-comment as per coding-style.
Loading history...
415
     * {@inheritdoc}
416
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
417
    public function indexOf($value, $strict = false)
418
    {
419
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
420
    }
421
422
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $items should have a doc-comment as per coding-style.
Loading history...
423
     * {@inheritdoc}
424
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
425
    public function merge($items)
426
    {
427
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
428
    }
429
430
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $callback should have a doc-comment as per coding-style.
Loading history...
431
     * {@inheritdoc}
432
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
433
    public function sort(callable $callback = null)
434
    {
435
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
436
    }
437
438
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $offset should have a doc-comment as per coding-style.
Loading history...
439
     * {@inheritdoc}
440
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
441
    public function offsetExists($offset)
442
    {
443
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
444
    }
445
446
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $offset should have a doc-comment as per coding-style.
Loading history...
447
     * {@inheritdoc}
448
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
449
    public function offsetGet($offset)
450
    {
451
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
452
    }
453
454
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $value should have a doc-comment as per coding-style.
Loading history...
Coding Style introduced by
Parameter $offset should have a doc-comment as per coding-style.
Loading history...
455
     * {@inheritdoc}
456
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
457
    public function offsetSet($offset, $value)
458
    {
459
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
460
    }
461
462
    /**
0 ignored issues
show
Coding Style introduced by
Parameter $offset should have a doc-comment as per coding-style.
Loading history...
463
     * {@inheritdoc}
464
     */
0 ignored issues
show
Coding Style Documentation introduced by
Missing @throws tag in function comment
Loading history...
465
    public function offsetUnset($offset)
466
    {
467
        throw new BadMethodCallException('Collection methods are not supported by the Walker');
468
    }
469
}
470