Merge pull request #26553 from szepeviktor/patch-2

Fix PHPDoc in WC_Notes_Run_Db_Update
This commit is contained in:
Claudio Sanches 2020-07-01 12:46:48 -03:00 committed by GitHub
commit 2874915339
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 9 deletions

View File

@ -91,17 +91,13 @@ class WC_Notes_Run_Db_Update {
*
* @param WC_Admin_Note $note Note to check.
* @param string $update_url URL to check the note against.
* @param array( string ) $current_actions List of actions to check for.
* @param array<int, string> $current_actions List of actions to check for.
* @return bool
*/
private static function note_up_to_date( $note, $update_url, $current_actions ) {
$actions = $note->get_actions();
if ( count( $current_actions ) === count( array_intersect( wp_list_pluck( $actions, 'name' ), $current_actions ) )
&& in_array( $update_url, wp_list_pluck( $actions, 'query' ), true ) ) {
return true;
}
return false;
return count( $current_actions ) === count( array_intersect( wp_list_pluck( $actions, 'name' ), $current_actions ) )
&& in_array( $update_url, wp_list_pluck( $actions, 'query' ), true );
}
/**