Skip to content

Commit

Permalink
Increase PHPStan rule level to 10
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Nov 18, 2024
1 parent 9a3ad55 commit 8830033
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
parameters:
level: 9
level: 10
paths:
- src
6 changes: 6 additions & 0 deletions src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
namespace SebastianBergmann;

use const DIRECTORY_SEPARATOR;
use function assert;
use function end;
use function explode;
use function fclose;
use function is_array;
use function is_dir;
use function is_resource;
use function proc_close;
Expand Down Expand Up @@ -97,6 +99,10 @@ private function getGitInformation(string $path): false|string
return false;
}

assert(is_array($pipes));
assert(isset($pipes[1]) && is_resource($pipes[1]));
assert(isset($pipes[2]) && is_resource($pipes[2]));

$result = trim((string) stream_get_contents($pipes[1]));

fclose($pipes[1]);
Expand Down

0 comments on commit 8830033

Please sign in to comment.