Skip to content

Commit

Permalink
wip: Add ignore comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kjohnson committed Aug 1, 2023
1 parent 4f1928a commit 288bd46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/DonationForms/V2/Endpoints/ListDonationForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

Check failure on line 133 in src/DonationForms/V2/Endpoints/ListDonationForms.php

View workflow job for this annotation

GitHub Actions / build / analyse (7.4)

Function give_is_form_migrated not found.

Check failure on line 133 in src/DonationForms/V2/Endpoints/ListDonationForms.php

View workflow job for this annotation

GitHub Actions / build / analyse (8)

Function give_is_form_migrated not found.
$canTransfer = $v2form && ! $canMigrate && ! give_is_form_donations_transferred($item['id']); // @phpstan-ignore

Check failure on line 134 in src/DonationForms/V2/Endpoints/ListDonationForms.php

View workflow job for this annotation

GitHub Actions / build / analyse (7.4)

Function give_is_form_donations_transferred not found.

Check failure on line 134 in src/DonationForms/V2/Endpoints/ListDonationForms.php

View workflow job for this annotation

GitHub Actions / build / analyse (8)

Function give_is_form_donations_transferred not found.

$item['name'] = get_the_title($item['id']);
$item['edit'] = get_edit_post_link($item['id'], 'edit');
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/DonationForms/Endpoints/TestListDonationForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 288bd46

Please sign in to comment.