Skip to content

Commit 97bd54b

Browse files
committed
Level 4
1 parent 4b91c1f commit 97bd54b

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

lib/cli/Arguments.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,15 @@ private function _parseOption($option) {
484484
$values = array();
485485

486486
// Loop until we find a flag in peak-ahead
487-
foreach ($this->_lexer as $value) {
488-
array_push($values, $value->raw);
487+
while ( $this->_lexer->valid() ) {
488+
$value = $this->_lexer->current();
489+
array_push( $values, $value->raw );
489490

490-
if (!$this->_lexer->end() && !$this->_lexer->peek->isValue) {
491+
// @phpstan-ignore-next-line
492+
if ( ! $this->_lexer->end() && ! $this->_lexer->peek->isValue ) {
491493
break;
492494
}
495+
$this->_lexer->next();
493496
}
494497

495498
$this[$option->key] = join(' ', $values);

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
parameters:
2-
level: 3
2+
level: 4
33
paths:
44
- lib
55
scanDirectories:

0 commit comments

Comments
 (0)