Skip to content

Commit 7327bea

Browse files
committed
Level 5
1 parent 97bd54b commit 7327bea

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

lib/cli/Arguments.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,8 @@ private function _parseOption($option) {
483483
// Store as array and join to string after looping for values
484484
$values = array();
485485

486+
$this->_lexer->next();
487+
486488
// Loop until we find a flag in peak-ahead
487489
while ( $this->_lexer->valid() ) {
488490
$value = $this->_lexer->current();

lib/cli/Notify.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function speed() {
120120
* @return string The formatted time span.
121121
*/
122122
public function formatTime($time) {
123-
return floor($time / 60) . ':' . str_pad($time % 60, 2, 0, STR_PAD_LEFT);
123+
return sprintf('%02d:%02d', (int)floor($time / 60), $time % 60);
124124
}
125125

126126
/**

lib/cli/progress/Bar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct($msg, $total, $interval = 100, $formatMessage = null
7171
public function display($finish = false) {
7272
$_percent = $this->percent();
7373

74-
$percent = str_pad(floor($_percent * 100), 3);
74+
$percent = str_pad((string)(int)floor($_percent * 100), 3);
7575
$msg = $this->_message;
7676
$current = $this->current();
7777
$total = $this->total();
@@ -91,7 +91,7 @@ public function display($finish = false) {
9191
$size = 0;
9292
}
9393

94-
$bar = str_repeat($this->_bars[0], floor($_percent * $size)) . $this->_bars[1];
94+
$bar = str_repeat($this->_bars[0], (int)floor($_percent * $size)) . $this->_bars[1];
9595
// substr is needed to trim off the bar cap at 100%
9696
$bar = substr(str_pad($bar, $size, ' '), 0, $size);
9797

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: 4
2+
level: 5
33
paths:
44
- lib
55
scanDirectories:

0 commit comments

Comments
 (0)