Skip to content

Commit

Permalink
fix correct us of Order Model
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolorenz committed May 30, 2024
1 parent 1eb6756 commit 9df80ff
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Controller/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use OxidSolutionCatalysts\Unzer\Exception\Redirect;
use OxidSolutionCatalysts\Unzer\Exception\RedirectWithMessage;
use OxidSolutionCatalysts\Unzer\Model\Payment;
use OxidSolutionCatalysts\Unzer\Model\Order as UnzerOrder;
use OxidSolutionCatalysts\Unzer\Service\DebugHandler;
use OxidSolutionCatalysts\Unzer\Service\ModuleSettings;
use OxidSolutionCatalysts\Unzer\Service\Payment as PaymentService;
Expand Down Expand Up @@ -122,7 +123,7 @@ public function unzerExecuteAfterRedirect(): void
if ($oBasket->getProductsCount()) {
$oDB = DatabaseProvider::getDb();

/** @var \OxidSolutionCatalysts\Unzer\Model\Order $oOrder */
/** @var UnzerOrder $oOrder */
$oOrder = $this->getActualOrder();

$oDB->startTransaction();
Expand Down Expand Up @@ -215,7 +216,7 @@ public function isSepaConfirmed(): ?bool
*/
public function saveUnzerTransaction(): void
{
/** @var \OxidSolutionCatalysts\Unzer\Model\Order $order */
/** @var UnzerOrder $oOrder */
$order = $this->getActualOrder();

Check failure on line 220 in src/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / styles (8.0)

Variable $oOrder in PHPDoc tag @var does not match assigned variable $order.
$order->initWriteTransactionToDB();

Check failure on line 221 in src/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / styles (8.0)

Call to an undefined method OxidEsales\Eshop\Application\Model\Order::initWriteTransactionToDB().
}
Expand Down Expand Up @@ -264,7 +265,7 @@ public function getUserCountryIso(): string
*/
public function getActualOrder(): Order
{
if (!($this->actualOrder instanceof \OxidSolutionCatalysts\Unzer\Model\Order)) {
if (!($this->actualOrder instanceof Order)) {
$this->actualOrder = oxNew(Order::class);
/** @var string $sess_challenge */
$sess_challenge = Registry::getSession()->getVariable('sess_challenge');
Expand Down Expand Up @@ -445,7 +446,7 @@ private function isPaymentCancelled(PaymentService $paymentService): bool
/**
* @throws \OxidSolutionCatalysts\Unzer\Exception\Redirect
*/
private function redirectUserToCheckout(Unzer $unzerService, \OxidSolutionCatalysts\Unzer\Model\Order $order)
private function redirectUserToCheckout(Unzer $unzerService, Order $order)

Check failure on line 449 in src/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / styles (8.0)

Method OxidSolutionCatalysts\Unzer\Controller\OrderController::redirectUserToCheckout() has no return type specified.
{
$translator = $this->getServiceFromContainer(Translator::class);
$unzerOrderNr = $order->getUnzerOrderNr();

Check failure on line 452 in src/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / styles (8.0)

Call to an undefined method OxidEsales\Eshop\Application\Model\Order::getUnzerOrderNr().
Expand Down

0 comments on commit 9df80ff

Please sign in to comment.