diff --git a/composer.json b/composer.json index 20e18af..8c17699 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "require": { "php": "^7.2 || ^8.0", "php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0", - "phpstan/phpstan": "^1.6", + "phpstan/phpstan": "^1.8.7", "symfony/polyfill-php73": "^1.12.0" }, "require-dev": { diff --git a/tests/data/_get_list_table.php b/tests/data/_get_list_table.php index 2d1b45d..ee11bc3 100644 --- a/tests/data/_get_list_table.php +++ b/tests/data/_get_list_table.php @@ -11,4 +11,4 @@ assertType('Unknown_Table|false', _get_list_table('Unknown_Table')); // Unknown class name -assertType('\WP_List_Table|false', _get_list_table($_GET['foo'])); +assertType('WP_List_Table|false', _get_list_table($_GET['foo'])); diff --git a/tests/data/get_comment.php b/tests/data/get_comment.php index ac224cb..bd314d2 100644 --- a/tests/data/get_comment.php +++ b/tests/data/get_comment.php @@ -12,7 +12,7 @@ assertType('WP_Comment|null', get_comment(1, 'Hello')); // Unknown output -assertType('array|\WP_Comment|null', get_comment(1, $_GET['foo'])); +assertType('array|WP_Comment|null', get_comment(1, $_GET['foo'])); // Associative array output assertType('array|null', get_comment(1, ARRAY_A)); diff --git a/tests/data/get_object_taxonomies.php b/tests/data/get_object_taxonomies.php index f379057..c0ef54b 100644 --- a/tests/data/get_object_taxonomies.php +++ b/tests/data/get_object_taxonomies.php @@ -12,7 +12,7 @@ assertType('array', get_object_taxonomies('post', 'Hello')); // Unknown output -assertType('array', get_object_taxonomies('post', $_GET['foo'])); +assertType('array', get_object_taxonomies('post', $_GET['foo'])); // Objects output assertType('array', get_object_taxonomies('post', 'objects'));