Skip to content

Commit

Permalink
PhpStan fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Feb 24, 2022
1 parent d6d6616 commit 7a55c80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/Repository/OrderRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ public function getOrderForCheckPayment(?string $currencyCode = null): array
->setParameter('currencyCode', $currencyCode);
}

/** @phpstan-ignore-next-line */
return $qb->getQuery()->getResult();
}

Expand Down
6 changes: 5 additions & 1 deletion src/Status/OrderStatusManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,15 @@ public function setStatus(OrderInterface $order, OrderStatus|string $status, boo
$status->isCreateInvoice()
|| $status->getCode() === OrderStatus::STATUS_PAID
|| (
$status->getCode() === OrderStatus::STATUS_DONE
$this->invoiceManager !== null
&& $status->getCode() === OrderStatus::STATUS_DONE
&& PHP_SAPI !== 'cli'
&& $this->invoiceManager->isInvoice($order) === false
)
) {
if ($this->invoiceManager === null) {
throw new \LogicException('Invoice manager does not exist, but it is mandatory.');
}
$attachments[] = $this->invoiceManager->getInvoicePath($this->createInvoice($order));
}

Expand Down

0 comments on commit 7a55c80

Please sign in to comment.