Skip to content

Commit cc402a8

Browse files
authored
Merge pull request #88 from wp-cli/add/phpstan
2 parents 2c23d83 + b570e9b commit cc402a8

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
],
1414
"require": {
15-
"wp-cli/wp-cli": "^2.12"
15+
"wp-cli/wp-cli": "^2.13"
1616
},
1717
"require-dev": {
1818
"wp-cli/entity-command": "^2",

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+
- server-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/Server_Command.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public function __invoke( $_, $assoc_args ) {
103103
$options['bypass_shell'] = true;
104104
}
105105

106+
// @phpstan-ignore argument.type
106107
exit( proc_close( proc_open( $cmd, $descriptors, $pipes, null, null, $options ) ) );
107108
}
108109
}

0 commit comments

Comments
 (0)