Skip to content

Commit 325a1c1

Browse files
committed
PHPStan improvement
1 parent b28f0bf commit 325a1c1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Menu_Item_Command.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,13 @@ public function get( $args, $assoc_args ) {
197197
}
198198

199199
/**
200-
* @var object{title: string, url: string, description: string, object: string, object_id: int, menu_item_parent: int, attr_title: string, target: string, classes: string[], xfn: string, type: string, type_label: string, menu_order: int, db_id: int, post_type: string} $menu_item
200+
* @var object{title: string, url: string, description: string, object: string, object_id: int, menu_item_parent: int, attr_title: string, target: string, classes: string[], xfn: string, type: string, type_label: string, menu_order: int, db_id: int, post_type: string}&\stdClass $menu_item
201201
*/
202202
$menu_item = wp_setup_nav_menu_item( $menu_item );
203203

204204
// Correct position inconsistency and protected `url` param in WP-CLI
205-
// @phpstan-ignore property.notFound
206205
$menu_item->position = ( 0 === $menu_item->menu_order ) ? 1 : $menu_item->menu_order;
207-
// @phpstan-ignore property.notFound
208-
$menu_item->link = $menu_item->url;
206+
$menu_item->link = $menu_item->url;
209207

210208
$formatter = $this->get_formatter( $assoc_args );
211209
$formatter->display_item( $menu_item );

0 commit comments

Comments
 (0)