Skip to content

Commit a6d3a6d

Browse files
JanTvrdikdg
authored andcommitted
increase phpstan level to 8 [Closes #54]
1 parent 94b3ea0 commit a6d3a6d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

phpstan.neon

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
parameters:
2-
level: 5
2+
level: 8
3+
checkMissingIterableValueType: false
34
errorFormat: raw
45

56
paths:

src/Schema/Message.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
namespace Nette\Schema;
1111

12+
use Nette;
13+
1214

1315
final class Message
1416
{
@@ -91,6 +93,6 @@ public function toString(): string
9193
return preg_replace_callback('~( ?)%(\w+)%~', function ($m) use ($vars) {
9294
[, $space, $key] = $m;
9395
return $vars[$key] === null ? '' : $space . $vars[$key];
94-
}, $this->message);
96+
}, $this->message) ?? throw new Nette\InvalidStateException(preg_last_error_msg());
9597
}
9698
}

src/Schema/Processor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
final class Processor
1919
{
2020
public array $onNewContext = [];
21-
private ?Context $context;
21+
private Context $context;
2222
private bool $skipDefaults = false;
2323

2424

0 commit comments

Comments
 (0)