Skip to content

Commit 43e9cbb

Browse files
authored
Merge pull request #82 from wp-cli/dependabot/composer/wp-cli/wp-cli-tests-tw-5
2 parents dd4d5d3 + 554c34b commit 43e9cbb

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
"wp-cli/wp-cli": "^2.12"
1616
},
1717
"require-dev": {
18-
"wp-cli/wp-cli-tests": "^4"
18+
"wp-cli/wp-cli-tests": "^5"
1919
},
2020
"config": {
2121
"process-timeout": 7200,
2222
"sort-packages": true,
2323
"allow-plugins": {
2424
"dealerdirect/phpcodesniffer-composer-installer": true,
25-
"johnpbloch/wordpress-core-installer": true
25+
"johnpbloch/wordpress-core-installer": true,
26+
"phpstan/extension-installer": true
2627
},
2728
"lock": false
2829
},
@@ -51,12 +52,14 @@
5152
"behat-rerun": "rerun-behat-tests",
5253
"lint": "run-linter-tests",
5354
"phpcs": "run-phpcs-tests",
55+
"phpstan": "run-phpstan-tests",
5456
"phpcbf": "run-phpcbf-cleanup",
5557
"phpunit": "run-php-unit-tests",
5658
"prepare-tests": "install-package-tests",
5759
"test": [
5860
"@lint",
5961
"@phpcs",
62+
"@phpstan",
6063
"@phpunit",
6164
"@behat"
6265
]

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)