Fix _get_list_table extension#190
Merged
szepeviktor merged 1 commit intoszepeviktor:masterfrom Jun 16, 2023
Merged
Conversation
Owner
|
Thank you! |
IanDelMar
added a commit
to IanDelMar/phpstan-wordpress
that referenced
this pull request
Jul 27, 2023
szepeviktor
added a commit
that referenced
this pull request
Jul 27, 2023
* Remove has_filter extension * Remove current_time extension * Remove mysql2date extension * Remove get_object_taxonomies extension * Remove get_taxonomies extension * Adapt get_post extension to new stub file * Adapt get_comment extension to new stub file * Fix CS * Update composer.json * Remove WP_Theme::get() * Remove get_permalink extension * Update .travis.yml * Remove term_exists extension * Update wp_error parameter extension * Update GetPostDynamicFunctionReturnTypeExtension.php * Fully remove wp_error parameter extension * Merge get_comment extension into get_post extension * Remove type specifiying extension and rule for `is_wp_error()` * Update README.md Co-authored-by: Viktor Szépe <viktor@szepe.net> * Remove echo parameter extension * Remove _get_list_table extension * Revert "Remove _get_list_table extension" This reverts commit 0191253. * Update get_post.php * Fix earlyTerminatingMethodCalls syntax (#173) * Remove deprecated instanceof (#183) * Remove deprecated `instanceof` (#184) * Remove deprecated `instanceof` * Remove space Co-authored-by: Viktor Szépe <viktor@szepe.net> * Return early * Fix handling of fields unions * Add tests --------- Co-authored-by: Viktor Szépe <viktor@szepe.net> * Remove deprecated `instanceof` (#185) * Fix CS (#186) * Fix CS * Fix PHP 7.2 compat. * Fix _get_list_table extension (#190) * Revert "Update composer.json" This reverts commit d15b7e1. --------- Co-authored-by: Viktor Szépe <viktor@szepe.net> Co-authored-by: Der Mundschenk & Compagnie <mundschenk-at@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the dynamic return type extension for
_get_list_table().According to the docs,
_get_list_table()returns a (known or unknown) child class of WP_List_Table or WP_List_Table class itself if the passed argument is a WP_List_Table (child) class name, andfalseotherwise.As the class name is filterable any WP_List_Table child class maybe returned... We can either assume that in most cases this filtered is not used and return a
WP_Posts_List_Tablewhen the argument isWP_Posts_List_Tableand risk that this is incorrect (the previous functionality and the current approach) or we can simply return aWP_List_Tablewhich will be correct but less precise.