diff --git a/composer.json b/composer.json index b447a72..1d86846 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ } ], "require": { - "wp-cli/wp-cli": "^2.12" + "wp-cli/wp-cli": "^2.13" }, "require-dev": { "wp-cli/entity-command": "^2", diff --git a/phpstan.neon.dist b/phpstan.neon.dist new file mode 100644 index 0000000..6fe826f --- /dev/null +++ b/phpstan.neon.dist @@ -0,0 +1,13 @@ +parameters: + level: 9 + paths: + - src + - server-command.php + scanDirectories: + - vendor/wp-cli/wp-cli/php + scanFiles: + - vendor/php-stubs/wordpress-stubs/wordpress-stubs.php + treatPhpDocTypesAsCertain: false + ignoreErrors: + - identifier: missingType.parameter + - identifier: missingType.return diff --git a/src/Server_Command.php b/src/Server_Command.php index e82a44c..7b37992 100644 --- a/src/Server_Command.php +++ b/src/Server_Command.php @@ -103,6 +103,7 @@ public function __invoke( $_, $assoc_args ) { $options['bypass_shell'] = true; } + // @phpstan-ignore argument.type exit( proc_close( proc_open( $cmd, $descriptors, $pipes, null, null, $options ) ) ); } }