Skip to content

Commit 058f24f

Browse files
committed
Minor fix for PHPStan
1 parent a209ea1 commit 058f24f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ parameters:
33
paths:
44
- src/
55

6+
level: 8
7+
68
ignoreErrors:
79
-
810
message: '#Function config not found#'

src/Commands/ShowLog.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ protected function printRecordSingleline(LogRecord $record): void {
215215
$plain = preg_replace('/<[^\/]*?>(.*?)<\/>/', '$1', $str);
216216

217217
// and shorten the entire string to fit one line
218-
if(strlen($plain) > $this->terminalWidth) {
218+
if(strlen($plain ?? '') > $this->terminalWidth) {
219219
// split the text open according to preg match
220220
$m = [];
221221
preg_match_all('/(<(?<tag>[^\/]*?)>(?<string>.*?)<\/>|.*?)/', $str, $m, PREG_SET_ORDER);

0 commit comments

Comments
 (0)