diff --git a/src/FormMigration/Actions/TransferDonations.php b/src/FormMigration/Actions/TransferDonations.php index d34b202466..f48b1e3777 100644 --- a/src/FormMigration/Actions/TransferDonations.php +++ b/src/FormMigration/Actions/TransferDonations.php @@ -13,12 +13,12 @@ public function __construct($sourceId) $this->sourceId = $sourceId; } - public static function from($sourceId): TransferDonations + public static function from($sourceId): self { return new TransferDonations($sourceId); } - public function to($destinationId) + public function to($destinationId): void { $this->__invoke($destinationId); } diff --git a/src/FormMigration/Actions/TransferFormUrl.php b/src/FormMigration/Actions/TransferFormUrl.php index 9c5243a3af..5c25fdadc5 100644 --- a/src/FormMigration/Actions/TransferFormUrl.php +++ b/src/FormMigration/Actions/TransferFormUrl.php @@ -11,12 +11,12 @@ public function __construct($sourceId) $this->sourceId = $sourceId; } - public static function from($sourceId): TransferFormUrl + public static function from($sourceId): self { return new TransferFormUrl($sourceId); } - public function to($destinationId) + public function to($destinationId): void { $this->__invoke($destinationId); } diff --git a/src/FormMigration/DataTransferObjects/FormMigrationPayload.php b/src/FormMigration/DataTransferObjects/FormMigrationPayload.php index 2e9f48c498..ab4546f478 100644 --- a/src/FormMigration/DataTransferObjects/FormMigrationPayload.php +++ b/src/FormMigration/DataTransferObjects/FormMigrationPayload.php @@ -19,8 +19,8 @@ public function __construct(DonationFormV2 $formV2, DonationFormV3 $formV3) $this->formV3 = $formV3; } - public static function fromFormV2(DonationFormV2 $formV2): FormMigrationPayload + public static function fromFormV2(DonationFormV2 $formV2): self { - return new FormMigrationPayload($formV2, DonationFormV3::factory()->create()); + return new self($formV2, DonationFormV3::factory()->create()); } } diff --git a/src/FormMigration/DataTransferObjects/TransferOptions.php b/src/FormMigration/DataTransferObjects/TransferOptions.php index 567a5e89fc..1717f3065a 100644 --- a/src/FormMigration/DataTransferObjects/TransferOptions.php +++ b/src/FormMigration/DataTransferObjects/TransferOptions.php @@ -22,18 +22,18 @@ public function __construct(bool $changeUrl, bool $delete, bool $redirect) $this->redirect = $redirect; } - public static function fromRequest(WP_REST_Request $request): TransferOptions + public static function fromRequest(WP_REST_Request $request): self { - return new TransferOptions( + return new self( $request->get_param('changeUrl'), $request->get_param('delete'), $request->get_param('redirect') ); } - public static function fromArray($options): TransferOptions + public static function fromArray($options): self { - return new TransferOptions( + return new self( $options['changeUrl'], $options['delete'], $options['redirect']