Skip to content

Commit

Permalink
- composer fix-cs
Browse files Browse the repository at this point in the history
- composer phpstan
  • Loading branch information
jasonbahl committed Feb 13, 2024
1 parent a1a34c5 commit 426bd7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Cache/Invalidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ public function on_updated_menu_meta_cb( $meta_id, $object_id, $meta_key, $meta_
* @return void
* @throws Exception
*/
public function on_menu_item_added_to_menu_cb( int $object_id, int $tt_id, string $taxonomy ): void {
public function on_menu_item_added_to_menu_cb( int $object_id, int $tt_id, string $taxonomy ): void {

if ( 'nav_menu' !== $taxonomy ) {
return;
Expand All @@ -905,7 +905,7 @@ public function on_menu_item_added_to_menu_cb( int $object_id, int $tt_id, strin
$menu_term = get_term_by( 'term_taxonomy_id', absint( $tt_id ), $taxonomy );

// if the menu isn't public do nothing
if ( ! $menu_term || ! $this->is_menu_public( absint( $menu_term->term_id ) ) ) {
if ( ! isset( $menu_term->term_id ) || ! $this->is_menu_public( absint( $menu_term->term_id ) ) ) {
return;
}

Expand All @@ -923,12 +923,12 @@ public function on_menu_item_added_to_menu_cb( int $object_id, int $tt_id, strin
* @return void
* @throws Exception
*/
public function on_menu_item_updated_cb( int $menu_id, int $menu_item_db_id, array $args ): void {
public function on_menu_item_updated_cb( int $menu_id, int $menu_item_db_id, array $args ): void {

$menu_term = get_term_by( 'term_id', absint( $menu_id ), 'nav_menu' );

// if the menu isn't public do nothing
if ( ! $menu_term || ! $this->is_menu_public( absint( $menu_term->term_id ) ) ) {
if ( ! isset( $menu_term->term_id ) || ! $this->is_menu_public( absint( $menu_term->term_id ) ) ) {
return;
}

Expand All @@ -944,7 +944,7 @@ public function on_menu_item_updated_cb( int $menu_id, int $menu_item_db_id, arr
*
* @return void
*/
public function on_menu_item_deleted_cb( int $post_id, WP_Post $post ): void {
public function on_menu_item_deleted_cb( int $post_id, WP_Post $post ): void {

if ( 'nav_menu_item' !== $post->post_type ) {
return;
Expand Down
2 changes: 1 addition & 1 deletion tests/wpunit/PostCacheInvalidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ public function testPublishedPostWithCategoryIsForceDeleted() {

// make assertions about the evicted caches
$this->assertNotEmpty( $evicted_caches );

$this->assertEqualSets([
'userWithPostsConnection',
'singleCategory',
Expand Down

0 comments on commit 426bd7a

Please sign in to comment.