diff --git a/phpstan.neon b/phpstan.neon index d5a71e6..e83d1d5 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -12,5 +12,6 @@ parameters: bootstrapFiles: - vendor/php-stubs/wordpress-stubs/wordpress-stubs.php - vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php + - tests/stubs/wp-cli-stubs.php ignoreErrors: - '#Constant [A-Z_]+ not found#' diff --git a/tests/stubs/wp-cli-stubs.php b/tests/stubs/wp-cli-stubs.php new file mode 100644 index 0000000..b87c55b --- /dev/null +++ b/tests/stubs/wp-cli-stubs.php @@ -0,0 +1,56 @@ + $assoc_args + */ + public static function confirm(string $question, array $assoc_args = []): void + { + } + } +} + +namespace WP_CLI\Utils { + /** + * @param array> $items + * @param array $fields + */ + function format_items(string $format, array $items, array $fields): void + { + } +}