Skip to content
This repository was archived by the owner on Oct 7, 2022. It is now read-only.

Commit b18d680

Browse files
committed
Add PhpStan & fix lvl 7
1 parent 61dee32 commit b18d680

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
"psr-4": {
1818
"JakubBoucek\\ComposerVendorChecker\\": "src/"
1919
}
20+
},
21+
"require-dev": {
22+
"phpstan/phpstan": "^0.11.15"
2023
}
2124
}

phpstan.neon

Whitespace-only changes.

src/Checker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ protected function readFile(string $file): string
158158
{
159159
$content = @file_get_contents($file); // @ is escalated to exception
160160
if ($content === false) {
161-
$lastError = preg_replace('#^\w+\(.*?\): #', '', error_get_last()['message']);
161+
$lastError = preg_replace('#^\w+\(.*?\): #', '', (string)error_get_last()['message']);
162162
throw new RuntimeException("Unable to read file '$file'. " . $lastError);
163163
}
164164
return $content;

0 commit comments

Comments
 (0)