Skip to content

Commit

Permalink
Fix FQCN types
Browse files Browse the repository at this point in the history
  • Loading branch information
herndlm committed Nov 9, 2022
1 parent e150358 commit 877d454
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion tests/data/_get_list_table.php
Expand Up @@ -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']));
2 changes: 1 addition & 1 deletion tests/data/get_comment.php
Expand Up @@ -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<string, mixed>|null', get_comment(1, ARRAY_A));
Expand Down
2 changes: 1 addition & 1 deletion tests/data/get_object_taxonomies.php
Expand Up @@ -12,7 +12,7 @@
assertType('array<int, string>', get_object_taxonomies('post', 'Hello'));

// Unknown output
assertType('array<string|\WP_Taxonomy>', get_object_taxonomies('post', $_GET['foo']));
assertType('array<string|WP_Taxonomy>', get_object_taxonomies('post', $_GET['foo']));

// Objects output
assertType('array<string, WP_Taxonomy>', get_object_taxonomies('post', 'objects'));

0 comments on commit 877d454

Please sign in to comment.