Skip to content

Commit

Permalink
OP-558 - update plugin to Sylius 2 - ecs
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusz-rup committed Jan 15, 2025
1 parent 2c298ab commit 6011bd4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
13 changes: 10 additions & 3 deletions src/Converter/FraudSuspicionCommonModelConverter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

/*
* This file has been created by developers from BitBag.
* Feel free to contact us once you face any issues or want to start
* You can find more information about us on https://bitbag.io and write us
* an email on [email protected].
*/

declare(strict_types=1);

namespace BitBag\SyliusBlacklistPlugin\Converter;
Expand Down Expand Up @@ -39,7 +46,7 @@ public function convertFraudSuspicionObject(FraudSuspicionInterface $fraudSuspic
'country' => $fraudSuspicion->getCountry(),
'postcode' => $fraudSuspicion->getPostcode(),
'customerIp' => $fraudSuspicion->getCustomerIp(),
]
],
);
}

Expand All @@ -63,7 +70,7 @@ public function convertOrderObject(OrderInterface $order, string $addressType):
'country' => $address->getCountryCode(),
'postcode' => $address->getPostcode(),
'customerIp' => $order->getCustomerIp(),
]
],
);
}

Expand All @@ -78,7 +85,7 @@ private function getAddressFromOrder(OrderInterface $order, string $addressType)

private function populateFraudSuspicionCommonModel(
FraudSuspicionCommonModelInterface $model,
array $data
array $data,
): FraudSuspicionCommonModelInterface {
$model->setOrder($data['order']);
$model->setCustomer($data['customer']);
Expand Down
5 changes: 3 additions & 2 deletions src/Resolver/SuspiciousOrderResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ public function __construct(
private BlacklistingRuleRepositoryInterface $blacklistingRuleRepository,
private ChannelContextInterface $channelContext,
private ObjectManager $customerManager,
private BlacklistingRuleEligibilityCheckerInterface $blacklistingRuleEligibilityChecker
) {}
private BlacklistingRuleEligibilityCheckerInterface $blacklistingRuleEligibilityChecker,
) {
}

public function resolve(FraudSuspicionCommonModelInterface $fraudSuspicionCommonModel): bool
{
Expand Down
5 changes: 3 additions & 2 deletions src/StateResolver/CustomerStateResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ class CustomerStateResolver implements CustomerStateResolverInterface
{
public function __construct(
private WorkflowInterface $workflow,
private ObjectManager $customerManager
) {}
private ObjectManager $customerManager,
) {
}

public function changeStateOnBlacklisted(CustomerInterface $customer): void
{
Expand Down

0 comments on commit 6011bd4

Please sign in to comment.