From 8348e009eaf0291e1414f2b0e1e198b744059300 Mon Sep 17 00:00:00 2001 From: Pierre du Plessis Date: Tue, 7 Nov 2023 17:16:02 +0200 Subject: [PATCH] Add void return type to all methods --- Action/CaptureAction.php | 2 +- Action/CaptureOffsiteAction.php | 2 +- Action/CaptureOffsiteNullAction.php | 2 +- Action/ConvertPaymentAction.php | 2 +- Action/NotifyAction.php | 2 +- Action/NotifyNullAction.php | 2 +- Action/StatusAction.php | 2 +- Api.php | 2 +- Be2BillDirectGatewayFactory.php | 2 +- Be2BillOffsiteGatewayFactory.php | 2 +- Tests/Action/CaptureActionTest.php | 28 +++++++++++----------- Tests/Action/CaptureOffsiteActionTest.php | 14 +++++------ Tests/Action/ConvertPaymentActionTest.php | 4 ++-- Tests/Action/NotifyActionTest.php | 18 +++++++------- Tests/Action/StatusActionTest.php | 10 ++++---- Tests/ApiTest.php | 18 +++++++------- Tests/Be2BillDirectGatewayFactoryTest.php | 8 +++---- Tests/Be2BillOffsiteGatewayFactoryTest.php | 8 +++---- 18 files changed, 64 insertions(+), 64 deletions(-) diff --git a/Action/CaptureAction.php b/Action/CaptureAction.php index 6c6ad31..2a689e6 100644 --- a/Action/CaptureAction.php +++ b/Action/CaptureAction.php @@ -31,7 +31,7 @@ public function __construct() /** * @param Capture $request */ - public function execute($request) + public function execute($request): void { RequestNotSupportedException::assertSupports($this, $request); diff --git a/Action/CaptureOffsiteAction.php b/Action/CaptureOffsiteAction.php index 9e87f7a..07856c3 100644 --- a/Action/CaptureOffsiteAction.php +++ b/Action/CaptureOffsiteAction.php @@ -34,7 +34,7 @@ public function __construct() /** * @param Capture $request */ - public function execute($request) + public function execute($request): void { RequestNotSupportedException::assertSupports($this, $request); diff --git a/Action/CaptureOffsiteNullAction.php b/Action/CaptureOffsiteNullAction.php index cecb95a..102352d 100644 --- a/Action/CaptureOffsiteNullAction.php +++ b/Action/CaptureOffsiteNullAction.php @@ -21,7 +21,7 @@ class CaptureOffsiteNullAction implements ActionInterface, GatewayAwareInterface /** * @param Capture $request */ - public function execute($request) + public function execute($request): void { RequestNotSupportedException::assertSupports($this, $request); diff --git a/Action/ConvertPaymentAction.php b/Action/ConvertPaymentAction.php index e64deed..e8b8f4f 100644 --- a/Action/ConvertPaymentAction.php +++ b/Action/ConvertPaymentAction.php @@ -13,7 +13,7 @@ class ConvertPaymentAction implements ActionInterface /** * @param Convert $request */ - public function execute($request) + public function execute($request): void { RequestNotSupportedException::assertSupports($this, $request); diff --git a/Action/NotifyAction.php b/Action/NotifyAction.php index 6fe4099..bfaaf1d 100644 --- a/Action/NotifyAction.php +++ b/Action/NotifyAction.php @@ -28,7 +28,7 @@ public function __construct() /** * @param Notify $request */ - public function execute($request) + public function execute($request): void { RequestNotSupportedException::assertSupports($this, $request); diff --git a/Action/NotifyNullAction.php b/Action/NotifyNullAction.php index 2bf472e..c4d9c5d 100644 --- a/Action/NotifyNullAction.php +++ b/Action/NotifyNullAction.php @@ -18,7 +18,7 @@ class NotifyNullAction implements ActionInterface, GatewayAwareInterface /** * @param Notify $request */ - public function execute($request) + public function execute($request): void { RequestNotSupportedException::assertSupports($this, $request); diff --git a/Action/StatusAction.php b/Action/StatusAction.php index 9c1303c..25de7aa 100644 --- a/Action/StatusAction.php +++ b/Action/StatusAction.php @@ -14,7 +14,7 @@ class StatusAction implements ActionInterface /** * @param GetStatusInterface $request */ - public function execute($request) + public function execute($request): void { RequestNotSupportedException::assertSupports($this, $request); diff --git a/Api.php b/Api.php index ece684b..c2ce90a 100644 --- a/Api.php +++ b/Api.php @@ -264,7 +264,7 @@ protected function doRequest(array $fields) return $result; } - protected function addGlobalParams(array &$params) + protected function addGlobalParams(array &$params): void { $params['VERSION'] = self::VERSION; $params['IDENTIFIER'] = $this->options['identifier']; diff --git a/Be2BillDirectGatewayFactory.php b/Be2BillDirectGatewayFactory.php index 44b3a82..542f21a 100644 --- a/Be2BillDirectGatewayFactory.php +++ b/Be2BillDirectGatewayFactory.php @@ -10,7 +10,7 @@ class Be2BillDirectGatewayFactory extends GatewayFactory { - protected function populateConfig(ArrayObject $config) + protected function populateConfig(ArrayObject $config): void { $config->defaults([ 'payum.factory_name' => 'be2bill_direct', diff --git a/Be2BillOffsiteGatewayFactory.php b/Be2BillOffsiteGatewayFactory.php index d6aedc0..0443ca4 100644 --- a/Be2BillOffsiteGatewayFactory.php +++ b/Be2BillOffsiteGatewayFactory.php @@ -10,7 +10,7 @@ class Be2BillOffsiteGatewayFactory extends Be2BillDirectGatewayFactory { - protected function populateConfig(ArrayObject $config) + protected function populateConfig(ArrayObject $config): void { $config->defaults([ 'payum.factory_name' => 'be2bill_offsite', diff --git a/Tests/Action/CaptureActionTest.php b/Tests/Action/CaptureActionTest.php index 16aab34..467c369 100644 --- a/Tests/Action/CaptureActionTest.php +++ b/Tests/Action/CaptureActionTest.php @@ -29,28 +29,28 @@ class CaptureActionTest extends GenericActionTest protected $requestClass = Capture::class; - public function testShouldImplementActionInterface() + public function testShouldImplementActionInterface(): void { $rc = new ReflectionClass(CaptureAction::class); $this->assertTrue($rc->implementsInterface(ActionInterface::class)); } - public function testShouldImplementGatewayAwareInterface() + public function testShouldImplementGatewayAwareInterface(): void { $rc = new ReflectionClass(CaptureAction::class); $this->assertTrue($rc->implementsInterface(GatewayAwareInterface::class)); } - public function testShouldImplementApiAwareInterface() + public function testShouldImplementApiAwareInterface(): void { $rc = new ReflectionClass(CaptureAction::class); $this->assertTrue($rc->implementsInterface(ApiAwareInterface::class)); } - public function testThrowIfUnsupportedApiGiven() + public function testThrowIfUnsupportedApiGiven(): void { $this->expectException(UnsupportedApiException::class); $action = new CaptureAction(); @@ -58,7 +58,7 @@ public function testThrowIfUnsupportedApiGiven() $action->setApi(new stdClass()); } - public function testThrowIfCreditCardNotSetExplicitlyAndObtainRequestNotSupportedOnCapture() + public function testThrowIfCreditCardNotSetExplicitlyAndObtainRequestNotSupportedOnCapture(): void { $this->expectException(LogicException::class); $this->expectExceptionMessage('Credit card details has to be set explicitly or there has to be an action that supports ObtainCreditCard request.'); @@ -85,7 +85,7 @@ public function testThrowIfCreditCardNotSetExplicitlyAndObtainRequestNotSupporte $action->execute($request); } - public function testShouldDoNothingIfExeccodeSet() + public function testShouldDoNothingIfExeccodeSet(): void { $gatewayMock = $this->createGatewayMock(); $gatewayMock @@ -110,7 +110,7 @@ public function testShouldDoNothingIfExeccodeSet() $action->execute($request); } - public function testShouldCaptureWithCreditCardSetExplicitly() + public function testShouldCaptureWithCreditCardSetExplicitly(): void { $gatewayMock = $this->createGatewayMock(); $gatewayMock @@ -156,14 +156,14 @@ public function testShouldCaptureWithCreditCardSetExplicitly() $this->assertSame('FOOVAL', $model['FOO']); } - public function testShouldCaptureWithObtainedCreditCard() + public function testShouldCaptureWithObtainedCreditCard(): void { $gatewayMock = $this->createGatewayMock(); $gatewayMock ->expects($this->once()) ->method('execute') ->with($this->isInstanceOf(ObtainCreditCard::class)) - ->willReturnCallback(function (ObtainCreditCard $request) { + ->willReturnCallback(function (ObtainCreditCard $request): void { $card = new CreditCard(); $card->setNumber('1234567812345678'); $card->setExpireAt(new DateTime('2014-10-01')); @@ -212,14 +212,14 @@ public function testShouldCaptureWithObtainedCreditCard() $this->assertNull($model['CARDCODE']->peek(), 'Already erased'); } - public function testShouldCaptureWithObtainedCreditCardWhenTokenReturned() + public function testShouldCaptureWithObtainedCreditCardWhenTokenReturned(): void { $gatewayMock = $this->createGatewayMock(); $gatewayMock ->expects($this->once()) ->method('execute') ->with($this->isInstanceOf(ObtainCreditCard::class)) - ->willReturnCallback(function (ObtainCreditCard $request) { + ->willReturnCallback(function (ObtainCreditCard $request): void { $card = new CreditCard(); $card->setToken('theCreditCardToken'); @@ -264,7 +264,7 @@ public function testShouldCaptureWithObtainedCreditCardWhenTokenReturned() ], $model); } - public function testShouldPassFirstAndCurrentModelsWithObtainCreditCardSubRequest() + public function testShouldPassFirstAndCurrentModelsWithObtainCreditCardSubRequest(): void { $firstModel = new stdClass(); $currentModel = new ArrayObject([ @@ -288,7 +288,7 @@ public function testShouldPassFirstAndCurrentModelsWithObtainCreditCardSubReques ->expects($this->once()) ->method('execute') ->with($this->isInstanceOf(ObtainCreditCard::class)) - ->willReturnCallback(function (ObtainCreditCard $request) use ($firstModel, $currentModel) { + ->willReturnCallback(function (ObtainCreditCard $request) use ($firstModel, $currentModel): void { $this->assertSame($firstModel, $request->getFirstModel()); $this->assertSame($currentModel, $request->getModel()); @@ -309,7 +309,7 @@ public function testShouldPassFirstAndCurrentModelsWithObtainCreditCardSubReques $action->execute($capture); } - public function testShouldThrowHttpResponseIfExecCode3DSecureRequired() + public function testShouldThrowHttpResponseIfExecCode3DSecureRequired(): void { $action = new CaptureAction(); diff --git a/Tests/Action/CaptureOffsiteActionTest.php b/Tests/Action/CaptureOffsiteActionTest.php index 9a412d6..9861cca 100644 --- a/Tests/Action/CaptureOffsiteActionTest.php +++ b/Tests/Action/CaptureOffsiteActionTest.php @@ -23,28 +23,28 @@ class CaptureOffsiteActionTest extends GenericActionTest protected $requestClass = Capture::class; - public function testShouldImplementActionInterface() + public function testShouldImplementActionInterface(): void { $rc = new ReflectionClass(CaptureOffsiteAction::class); $this->assertTrue($rc->implementsInterface(ActionInterface::class)); } - public function testShouldImplementGatewayAwareInterface() + public function testShouldImplementGatewayAwareInterface(): void { $rc = new ReflectionClass(CaptureOffsiteAction::class); $this->assertTrue($rc->implementsInterface(GatewayAwareInterface::class)); } - public function testShouldImplementApiAwareInterface() + public function testShouldImplementApiAwareInterface(): void { $rc = new ReflectionClass(CaptureOffsiteAction::class); $this->assertTrue($rc->implementsInterface(ApiAwareInterface::class)); } - public function testThrowIfUnsupportedApiGiven() + public function testThrowIfUnsupportedApiGiven(): void { $this->expectException(UnsupportedApiException::class); $action = new CaptureOffsiteAction(); @@ -52,7 +52,7 @@ public function testThrowIfUnsupportedApiGiven() $action->setApi(new stdClass()); } - public function testShouldRedirectToBe2billSiteIfExecCodeNotPresentInQuery() + public function testShouldRedirectToBe2billSiteIfExecCodeNotPresentInQuery(): void { $this->expectException(HttpPostRedirect::class); $model = [ @@ -91,7 +91,7 @@ public function testShouldRedirectToBe2billSiteIfExecCodeNotPresentInQuery() $action->execute($request); } - public function testShouldUpdateModelWhenComeBackFromBe2billSite() + public function testShouldUpdateModelWhenComeBackFromBe2billSite(): void { $model = [ 'AMOUNT' => 1000, @@ -111,7 +111,7 @@ public function testShouldUpdateModelWhenComeBackFromBe2billSite() ->expects($this->once()) ->method('execute') ->with($this->isInstanceOf(GetHttpRequest::class)) - ->willReturnCallback(function (GetHttpRequest $request) { + ->willReturnCallback(function (GetHttpRequest $request): void { $request->query['EXECCODE'] = 1; $request->query['FOO'] = 'fooVal'; }) diff --git a/Tests/Action/ConvertPaymentActionTest.php b/Tests/Action/ConvertPaymentActionTest.php index af4b536..771b756 100644 --- a/Tests/Action/ConvertPaymentActionTest.php +++ b/Tests/Action/ConvertPaymentActionTest.php @@ -36,7 +36,7 @@ public function provideNotSupportedRequests(): Iterator yield [new $this->requestClass($this->createMock(PaymentInterface::class), 'foobar')]; } - public function testShouldCorrectlyConvertOrderToDetailsAndSetItBack() + public function testShouldCorrectlyConvertOrderToDetailsAndSetItBack(): void { $payment = new Payment(); $payment->setNumber('theNumber'); @@ -70,7 +70,7 @@ public function testShouldCorrectlyConvertOrderToDetailsAndSetItBack() $this->assertSame('theClientEmail', $details['CLIENTEMAIL']); } - public function testShouldNotOverwriteAlreadySetExtraDetails() + public function testShouldNotOverwriteAlreadySetExtraDetails(): void { $payment = new Payment(); $payment->setCurrencyCode('USD'); diff --git a/Tests/Action/NotifyActionTest.php b/Tests/Action/NotifyActionTest.php index 66fc5fe..2350d87 100644 --- a/Tests/Action/NotifyActionTest.php +++ b/Tests/Action/NotifyActionTest.php @@ -23,21 +23,21 @@ class NotifyActionTest extends GenericActionTest protected $requestClass = Notify::class; - public function testShouldImplementGatewayAwareInterface() + public function testShouldImplementGatewayAwareInterface(): void { $rc = new ReflectionClass(NotifyAction::class); $this->assertTrue($rc->implementsInterface(GatewayAwareInterface::class)); } - public function testShouldImplementApiAwareInterface() + public function testShouldImplementApiAwareInterface(): void { $rc = new ReflectionClass(NotifyAction::class); $this->assertTrue($rc->implementsInterface(ApiAwareInterface::class)); } - public function testThrowIfUnsupportedApiGiven() + public function testThrowIfUnsupportedApiGiven(): void { $this->expectException(UnsupportedApiException::class); $action = new NotifyAction(); @@ -45,14 +45,14 @@ public function testThrowIfUnsupportedApiGiven() $action->setApi(new stdClass()); } - public function testThrowIfQueryHashDoesNotMatchExpected() + public function testThrowIfQueryHashDoesNotMatchExpected(): void { $gatewayMock = $this->createGatewayMock(); $gatewayMock ->expects($this->once()) ->method('execute') ->with($this->isInstanceOf(GetHttpRequest::class)) - ->willReturnCallback(function (GetHttpRequest $request) { + ->willReturnCallback(function (GetHttpRequest $request): void { $request->query = ['expected be2bill query']; }) ; @@ -80,14 +80,14 @@ public function testThrowIfQueryHashDoesNotMatchExpected() $this->fail('The exception is expected'); } - public function testThrowIfQueryAmountDoesNotMatchOneFromModel() + public function testThrowIfQueryAmountDoesNotMatchOneFromModel(): void { $gatewayMock = $this->createGatewayMock(); $gatewayMock ->expects($this->once()) ->method('execute') ->with($this->isInstanceOf(GetHttpRequest::class)) - ->willReturnCallback(function (GetHttpRequest $request) { + ->willReturnCallback(function (GetHttpRequest $request): void { $request->query = [ 'AMOUNT' => 2.0, ]; @@ -119,14 +119,14 @@ public function testThrowIfQueryAmountDoesNotMatchOneFromModel() $this->fail('The exception is expected'); } - public function testShouldUpdateModelIfNotificationValid() + public function testShouldUpdateModelIfNotificationValid(): void { $gatewayMock = $this->createGatewayMock(); $gatewayMock ->expects($this->once()) ->method('execute') ->with($this->isInstanceOf(GetHttpRequest::class)) - ->willReturnCallback(function (GetHttpRequest $request) { + ->willReturnCallback(function (GetHttpRequest $request): void { $request->query = [ 'AMOUNT' => 1.0, 'FOO' => 'FOO', diff --git a/Tests/Action/StatusActionTest.php b/Tests/Action/StatusActionTest.php index dea7e1e..16a546b 100644 --- a/Tests/Action/StatusActionTest.php +++ b/Tests/Action/StatusActionTest.php @@ -13,7 +13,7 @@ class StatusActionTest extends GenericActionTest protected $requestClass = GetHumanStatus::class; - public function testShouldMarkNewIfDetailsEmpty() + public function testShouldMarkNewIfDetailsEmpty(): void { $action = new StatusAction(); @@ -22,7 +22,7 @@ public function testShouldMarkNewIfDetailsEmpty() $this->assertTrue($status->isNew()); } - public function testShouldMarkNewIfExecCodeNotSet() + public function testShouldMarkNewIfExecCodeNotSet(): void { $action = new StatusAction(); @@ -31,7 +31,7 @@ public function testShouldMarkNewIfExecCodeNotSet() $this->assertTrue($status->isNew()); } - public function testShouldMarkCapturedIfExecCodeSuccessful() + public function testShouldMarkCapturedIfExecCodeSuccessful(): void { $action = new StatusAction(); @@ -42,7 +42,7 @@ public function testShouldMarkCapturedIfExecCodeSuccessful() $this->assertTrue($status->isCaptured()); } - public function testShouldMarkFailedIfExecCodeFailed() + public function testShouldMarkFailedIfExecCodeFailed(): void { $action = new StatusAction(); @@ -53,7 +53,7 @@ public function testShouldMarkFailedIfExecCodeFailed() $this->assertTrue($status->isFailed()); } - public function testShouldMarkUnknownIfExecCodeTimeOut() + public function testShouldMarkUnknownIfExecCodeTimeOut(): void { $action = new StatusAction(); diff --git a/Tests/ApiTest.php b/Tests/ApiTest.php index 079eaf5..d15581b 100644 --- a/Tests/ApiTest.php +++ b/Tests/ApiTest.php @@ -12,14 +12,14 @@ class ApiTest extends TestCase { - public function testThrowIfRequiredOptionsNotSetInConstructor() + public function testThrowIfRequiredOptionsNotSetInConstructor(): void { $this->expectException(LogicException::class); $this->expectExceptionMessage('The identifier, password fields are required.'); new Api([], $this->createHttpClientMock(), $this->createHttpMessageFactory()); } - public function testThrowIfSandboxOptionsNotBooleanInConstructor() + public function testThrowIfSandboxOptionsNotBooleanInConstructor(): void { $this->expectException(LogicException::class); $this->expectExceptionMessage('The boolean sandbox option must be set.'); @@ -30,7 +30,7 @@ public function testThrowIfSandboxOptionsNotBooleanInConstructor() ], $this->createHttpClientMock(), $this->createHttpMessageFactory()); } - public function testShouldReturnPostArrayWithOperationTypeAddedOnPrepareOffsitePayment() + public function testShouldReturnPostArrayWithOperationTypeAddedOnPrepareOffsitePayment(): void { $api = new Api([ 'identifier' => 'anId', @@ -47,7 +47,7 @@ public function testShouldReturnPostArrayWithOperationTypeAddedOnPrepareOffsiteP $this->assertSame(Api::OPERATION_PAYMENT, $post['OPERATIONTYPE']); } - public function testShouldReturnPostArrayWithGlobalsAddedOnPrepareOffsitePayment() + public function testShouldReturnPostArrayWithGlobalsAddedOnPrepareOffsitePayment(): void { $api = new Api([ 'identifier' => 'anId', @@ -65,7 +65,7 @@ public function testShouldReturnPostArrayWithGlobalsAddedOnPrepareOffsitePayment $this->assertArrayHasKey('HASH', $post); } - public function testShouldFilterNotSupportedOnPrepareOffsitePayment() + public function testShouldFilterNotSupportedOnPrepareOffsitePayment(): void { $api = new Api([ 'identifier' => 'anId', @@ -84,7 +84,7 @@ public function testShouldFilterNotSupportedOnPrepareOffsitePayment() $this->assertArrayNotHasKey('BAR', $post); } - public function testShouldKeepSupportedOnPrepareOffsitePayment() + public function testShouldKeepSupportedOnPrepareOffsitePayment(): void { $api = new Api([ 'identifier' => 'anId', @@ -106,7 +106,7 @@ public function testShouldKeepSupportedOnPrepareOffsitePayment() $this->assertSame('a desc', $post['DESCRIPTION']); } - public function testShouldReturnFalseIfHashNotSetToParams() + public function testShouldReturnFalseIfHashNotSetToParams(): void { $api = new Api([ 'identifier' => 'anId', @@ -117,7 +117,7 @@ public function testShouldReturnFalseIfHashNotSetToParams() $this->assertFalse($api->verifyHash([])); } - public function testShouldReturnFalseIfHashesMisMatched() + public function testShouldReturnFalseIfHashesMisMatched(): void { $params = [ 'foo' => 'fooVal', @@ -139,7 +139,7 @@ public function testShouldReturnFalseIfHashesMisMatched() $this->assertFalse($api->verifyHash($params)); } - public function testShouldReturnTrueIfHashesMatched() + public function testShouldReturnTrueIfHashesMatched(): void { $params = [ 'foo' => 'fooVal', diff --git a/Tests/Be2BillDirectGatewayFactoryTest.php b/Tests/Be2BillDirectGatewayFactoryTest.php index d149fc0..4867952 100644 --- a/Tests/Be2BillDirectGatewayFactoryTest.php +++ b/Tests/Be2BillDirectGatewayFactoryTest.php @@ -9,7 +9,7 @@ class Be2BillDirectGatewayFactoryTest extends AbstractGatewayFactoryTest { - public function testShouldAddDefaultConfigPassedInConstructorWhileCreatingGatewayConfig() + public function testShouldAddDefaultConfigPassedInConstructorWhileCreatingGatewayConfig(): void { $factory = new Be2BillDirectGatewayFactory([ 'foo' => 'fooVal', @@ -27,7 +27,7 @@ public function testShouldAddDefaultConfigPassedInConstructorWhileCreatingGatewa $this->assertSame('barVal', $config['bar']); } - public function testShouldConfigContainDefaultOptions() + public function testShouldConfigContainDefaultOptions(): void { $factory = new Be2BillDirectGatewayFactory(); @@ -43,7 +43,7 @@ public function testShouldConfigContainDefaultOptions() ], $config['payum.default_options']); } - public function testShouldConfigContainFactoryNameAndTitle() + public function testShouldConfigContainFactoryNameAndTitle(): void { $factory = new Be2BillDirectGatewayFactory(); @@ -58,7 +58,7 @@ public function testShouldConfigContainFactoryNameAndTitle() $this->assertSame('Be2Bill Direct', $config['payum.factory_title']); } - public function testShouldThrowIfRequiredOptionsNotPassed() + public function testShouldThrowIfRequiredOptionsNotPassed(): void { $this->expectException(LogicException::class); $this->expectExceptionMessage('The identifier, password fields are required.'); diff --git a/Tests/Be2BillOffsiteGatewayFactoryTest.php b/Tests/Be2BillOffsiteGatewayFactoryTest.php index a6bd261..c335c30 100644 --- a/Tests/Be2BillOffsiteGatewayFactoryTest.php +++ b/Tests/Be2BillOffsiteGatewayFactoryTest.php @@ -8,7 +8,7 @@ class Be2BillOffsiteGatewayFactoryTest extends AbstractGatewayFactoryTest { - public function testShouldAddDefaultConfigPassedInConstructorWhileCreatingGatewayConfig() + public function testShouldAddDefaultConfigPassedInConstructorWhileCreatingGatewayConfig(): void { $factory = new Be2BillOffsiteGatewayFactory([ 'foo' => 'fooVal', @@ -26,7 +26,7 @@ public function testShouldAddDefaultConfigPassedInConstructorWhileCreatingGatewa $this->assertSame('barVal', $config['bar']); } - public function testShouldConfigContainDefaultOptions() + public function testShouldConfigContainDefaultOptions(): void { $factory = new Be2BillOffsiteGatewayFactory(); @@ -42,7 +42,7 @@ public function testShouldConfigContainDefaultOptions() ], $config['payum.default_options']); } - public function testShouldConfigContainFactoryNameAndTitle() + public function testShouldConfigContainFactoryNameAndTitle(): void { $factory = new Be2BillOffsiteGatewayFactory(); @@ -57,7 +57,7 @@ public function testShouldConfigContainFactoryNameAndTitle() $this->assertSame('Be2Bill Offsite', $config['payum.factory_title']); } - public function testShouldThrowIfRequiredOptionsNotPassed() + public function testShouldThrowIfRequiredOptionsNotPassed(): void { $this->expectException(LogicException::class); $this->expectExceptionMessage('The identifier, password fields are required.');