From 288bd46bcce708c247918636e571120fc10e33ba Mon Sep 17 00:00:00 2001 From: "Kyle B. Johnson" Date: Tue, 1 Aug 2023 10:47:37 -0400 Subject: [PATCH] wip: Add ignore comments --- src/DonationForms/V2/Endpoints/ListDonationForms.php | 4 ++-- tests/Unit/DonationForms/Endpoints/TestListDonationForms.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/DonationForms/V2/Endpoints/ListDonationForms.php b/src/DonationForms/V2/Endpoints/ListDonationForms.php index f17be954d5..f52aa73d4c 100644 --- a/src/DonationForms/V2/Endpoints/ListDonationForms.php +++ b/src/DonationForms/V2/Endpoints/ListDonationForms.php @@ -130,8 +130,8 @@ public function handleRequest(WP_REST_Request $request): WP_REST_Response foreach ($items as &$item) { $v2form = defined('GIVE_NEXT_GEN_VERSION') && ! get_post_meta($item['id'], 'formBuilderFields'); - $canMigrate = $v2form && ! give_is_form_migrated($item['id']); - $canTransfer = $v2form && ! $canMigrate && ! give_is_form_donations_transferred($item['id']); + $canMigrate = $v2form && ! give_is_form_migrated($item['id']); // @phpstan-ignore + $canTransfer = $v2form && ! $canMigrate && ! give_is_form_donations_transferred($item['id']); // @phpstan-ignore $item['name'] = get_the_title($item['id']); $item['edit'] = get_edit_post_link($item['id'], 'edit'); diff --git a/tests/Unit/DonationForms/Endpoints/TestListDonationForms.php b/tests/Unit/DonationForms/Endpoints/TestListDonationForms.php index 743967e993..734305d65a 100644 --- a/tests/Unit/DonationForms/Endpoints/TestListDonationForms.php +++ b/tests/Unit/DonationForms/Endpoints/TestListDonationForms.php @@ -109,8 +109,8 @@ public function getMockColumns(array $donationForms, string $sortDirection = 'de $expectedItem[$column::getId()] = $column->getCellValue($donationForm); } $v2form = defined('GIVE_NEXT_GEN_VERSION') && ! get_post_meta($donationForm->id, 'formBuilderFields'); - $canMigrate = $v2form && ! give_is_form_migrated($donationForm->id); - $canTransfer = $v2form && ! $canMigrate && ! give_is_form_donations_transferred($donationForm->id); + $canMigrate = $v2form && ! give_is_form_migrated($donationForm->id); // @phpstan-ignore + $canTransfer = $v2form && ! $canMigrate && ! give_is_form_donations_transferred($donationForm->id); // @phpstan-ignore $expectedItem['name'] = $donationForm->title; $expectedItem['edit'] = get_edit_post_link($donationForm->id, 'edit');