Skip to content

Commit

Permalink
REWORK review annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
estafilarakis committed Feb 24, 2020
1 parent 64f5862 commit a1c567b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion meta/documents/changelog_de.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Notes für Kauf auf Rechnung

## 2.0.4 (2020-02-17)
## 2.0.4 (2020-02-25)
### Gefixt
- Alle Einstellungen / Beschränkungen werden nun korrekt abgefragt.

Expand Down
2 changes: 1 addition & 1 deletion meta/documents/changelog_en.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Notes for Invoice

## 2.0.4 (2020-02-17)
## 2.0.4 (2020-02-25)
### Fixed
- All settings / restrictions are now queried correctly.

Expand Down
14 changes: 7 additions & 7 deletions src/Methods/InvoicePaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public function __construct(
*/
public function isActive( BasketRepositoryContract $basketRepositoryContract):bool
{
/** @var InvoiceLimitationsService $helper */
$helper = pluginApp(InvoiceLimitationsService::class);
/** @var InvoiceLimitationsService $service */
$service = pluginApp(InvoiceLimitationsService::class);

/** @var ContactRepositoryContract $contactRepo */
$contactRepo = pluginApp(ContactRepositoryContract::class);
Expand All @@ -87,7 +87,7 @@ public function isActive( BasketRepositoryContract $basketRepositoryContract):bo
} catch(\Exception $ex) {}
}

return $helper->respectsAllLimitations(
return $service->respectsAllLimitations(
pluginApp(SettingsHelper::class, [$this->settings, $this->systemService->getPlentyId()]),
$this->checkout->getShippingCountryId(),
$isGuest,
Expand Down Expand Up @@ -203,8 +203,8 @@ public function getDescription():string
*/
public function isSwitchableTo(int $orderId = null):bool
{
/** @var InvoiceLimitationsService $helper */
$helper = pluginApp(InvoiceLimitationsService::class);
/** @var InvoiceLimitationsService $service */
$service = pluginApp(InvoiceLimitationsService::class);

// If order ID is given check the order data
if(!is_null($orderId) && $orderId > 0) {
Expand All @@ -218,7 +218,7 @@ public function isSwitchableTo(int $orderId = null):bool
$order = $orderRepo->findOrderById($orderId, ['amounts', 'addresses']);
$contact = $order->contactReceiver;

return $helper->respectsAllLimitations(
return $service->respectsAllLimitations(
pluginApp(SettingsHelper::class, [$this->settings, $order->plentyId]),
$order->deliveryAddress->countryId,
$contact === null || $contact->singleAccess === "1",
Expand Down Expand Up @@ -248,7 +248,7 @@ public function isSwitchableTo(int $orderId = null):bool
} catch(\Exception $ex) {}
}

return $helper->respectsAllLimitations(
return $service->respectsAllLimitations(
pluginApp(SettingsHelper::class, [$this->settings, $this->systemService->getPlentyId()]),
$this->checkout->getShippingCountryId(),
$isGuest,
Expand Down

0 comments on commit a1c567b

Please sign in to comment.