Skip to content

Commit 554c34b

Browse files
committed
PHPStan level 9
1 parent 2ab7895 commit 554c34b

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

‎phpstan.neon.dist‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
parameters:
2+
level: 9
3+
paths:
4+
- src
5+
- eval-command.php
6+
scanDirectories:
7+
- vendor/wp-cli/wp-cli/php
8+
scanFiles:
9+
- vendor/php-stubs/wordpress-stubs/wordpress-stubs.php
10+
treatPhpDocTypesAsCertain: false
11+
ignoreErrors:
12+
- identifier: missingType.parameter
13+
- identifier: missingType.return

‎src/EvalFile_Command.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private static function execute_eval( $file, $args, $use_include ) {
7272
} elseif ( $use_include ) {
7373
include $file;
7474
} else {
75-
$file_contents = file_get_contents( $file );
75+
$file_contents = (string) file_get_contents( $file );
7676

7777
// Adjust for __FILE__ and __DIR__ magic constants.
7878
$file_contents = Utils\replace_path_consts( $file_contents, $file );

0 commit comments

Comments
 (0)