Skip to content

Commit f1b66b8

Browse files
committed
Fix more nullable instances
1 parent 8aa8c97 commit f1b66b8

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

Action/GetCurrencyAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GetCurrencyAction implements ActionInterface
1919
/**
2020
* @param ISO4217 $iso4217
2121
*/
22-
public function __construct(ISO4217 $iso4217 = null)
22+
public function __construct(?ISO4217 $iso4217 = null)
2323
{
2424
if ($iso4217 instanceof ISO4217) {
2525
@trigger_error(sprintf('Passing an instance of %s in %s is deprecated and won\'t be supported in version 2.', ISO4217::class, __METHOD__), E_USER_DEPRECATED);

Bridge/Symfony/Action/GetHttpRequestAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ class GetHttpRequestAction implements ActionInterface
2323
* @param Request|null $httpRequest
2424
* @deprecated
2525
*/
26-
public function setHttpRequest(Request $httpRequest = null)
26+
public function setHttpRequest(?Request $httpRequest = null)
2727
{
2828
$this->httpRequest = $httpRequest;
2929
}
3030

3131
/**
3232
* @param RequestStack|null $httpRequestStack
3333
*/
34-
public function setHttpRequestStack(RequestStack $httpRequestStack = null)
34+
public function setHttpRequestStack(?RequestStack $httpRequestStack = null)
3535
{
3636
$this->httpRequestStack = $httpRequestStack;
3737
}

Bridge/Symfony/Action/ObtainCreditCardAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ public function __construct(FormFactoryInterface $formFactory, $templateName)
5555
* @param Request $request
5656
* @deprecated
5757
*/
58-
public function setRequest(Request $request = null)
58+
public function setRequest(?Request $request = null)
5959
{
6060
$this->httpRequest = $request;
6161
}
6262

6363
/**
6464
* @param RequestStack|null $requestStack
6565
*/
66-
public function setRequestStack(RequestStack $requestStack = null)
66+
public function setRequestStack(?RequestStack $requestStack = null)
6767
{
6868
$this->httpRequestStack = $requestStack;
6969
}

Extension/Context.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getReply()
7676
/**
7777
* @param null|ReplyInterface $reply
7878
*/
79-
public function setReply(ReplyInterface $reply = null)
79+
public function setReply(?ReplyInterface $reply = null)
8080
{
8181
$this->reply = $reply;
8282
}
@@ -92,7 +92,7 @@ public function getException()
9292
/**
9393
* @param \Exception|null $exception
9494
*/
95-
public function setException(\Exception $exception = null)
95+
public function setException(?\Exception $exception = null)
9696
{
9797
$this->exception = $exception;
9898
}

GatewayFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GatewayFactory implements GatewayFactoryInterface
1919
* @param array $defaultConfig
2020
* @param GatewayFactoryInterface $coreGatewayFactory
2121
*/
22-
public function __construct(array $defaultConfig = array(), GatewayFactoryInterface $coreGatewayFactory = null)
22+
public function __construct(array $defaultConfig = array(), ?GatewayFactoryInterface $coreGatewayFactory = null)
2323
{
2424
$this->coreGatewayFactory = $coreGatewayFactory ?: new CoreGatewayFactory();
2525
$this->defaultConfig = $defaultConfig;

Request/Convert.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Convert
3030
* @param string $to
3131
* @param TokenInterface $token
3232
*/
33-
public function __construct($source, $to, TokenInterface $token = null)
33+
public function __construct($source, $to, ?TokenInterface $token = null)
3434
{
3535
$this->source = $source;
3636
$this->to = $to;

Security/GenericTokenFactoryAwareInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ interface GenericTokenFactoryAwareInterface
88
*
99
* @return void
1010
*/
11-
public function setGenericTokenFactory(GenericTokenFactoryInterface $genericTokenFactory = null);
11+
public function setGenericTokenFactory(?GenericTokenFactoryInterface $genericTokenFactory = null);
1212
}

Security/GenericTokenFactoryAwareTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ trait GenericTokenFactoryAwareTrait
1313
*
1414
* @return void
1515
*/
16-
public function setGenericTokenFactory(GenericTokenFactoryInterface $genericTokenFactory = null)
16+
public function setGenericTokenFactory(?GenericTokenFactoryInterface $genericTokenFactory = null)
1717
{
1818
$this->tokenFactory = $genericTokenFactory;
1919
}

Tests/Extension/GenericTokenFactoryExtensionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function supports($request)
105105
{
106106
}
107107

108-
public function setGenericTokenFactory(GenericTokenFactoryInterface $genericTokenFactory = null)
108+
public function setGenericTokenFactory(?GenericTokenFactoryInterface $genericTokenFactory = null)
109109
{
110110
$this->tokenFactory = $genericTokenFactory;
111111
}

0 commit comments

Comments
 (0)