Skip to content

Commit c148041

Browse files
authored
[UPMERGE] 1.0 -> 2.0 (#134)
This PR has been generated automatically. For more details see [upmerge_pr.yaml](/Sylius/MolliePlugin/blob/1.0/.github/workflows/upmerge_pr.yaml). **Remember!** The upmerge should always be merged with using `Merge pull request` button. In case of conflicts, please resolve them manually with usign the following commands: ``` git fetch upstream gh pr checkout <this-pr-number> git merge upstream/2.0 -m "Resolve conflicts between 1.0 and 2.0" ``` If you use other name for the upstream remote, please replace `upstream` with the name of your remote pointing to the `Sylius/MolliePlugin` repository. Once the conflicts are resolved, please run `git merge --continue` and push the changes to this PR.
2 parents caf3a5b + 16561e4 commit c148041

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Validator/Constraints/PaymentMethodMollieChannelUniqueValidator.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,11 @@ private function isTheSameChannel(Collection $newChannels, Collection $paymentMe
113113

114114
private function isMolliePaymentMethod(PaymentMethodInterface $paymentMethod): bool
115115
{
116-
/** @var GatewayConfigInterface $gateway */
116+
/** @var GatewayConfigInterface|null $gateway */
117117
$gateway = $paymentMethod->getGatewayConfig();
118+
if (null === $gateway) {
119+
return false;
120+
}
118121

119122
return true === in_array(
120123
$gateway->getFactoryName(),

0 commit comments

Comments
 (0)