Skip to content
Code-Schnipsel Gruppen Projekte
Commit 222a914c erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

style: update code formatting and type declarations

Changes include:
- Modified code formatting to improve readability and conform to best coding practices.
- Updated type declarations using pipe (|) operator to indicate variable can hold multiple types.
- Adjusted the spacing around the pipe operator in type declarations for improved readability.
Übergeordneter e8a56bf2
No related branches found
No related tags found
2 Merge Requests!146fix: update `getCustomerFiles` method signature in `AbstractOrder`,!145Update 'next-3.x' with latest changes from 'main'
Pipeline #15528 fehlgeschlagen mit Phase
in 2 Minuten und 30 Sekunden
......@@ -85,7 +85,7 @@ abstract class AbstractOrder extends QUI\QDOM implements OrderInterface, ErpEnti
/**
* @var Status|StatusUnknown|null
*/
protected Status|StatusUnknown|null $Status = null;
protected Status | StatusUnknown | null $Status = null;
/**
* @var null|QUI\ERP\Shipping\ShippingStatus\Status
......@@ -102,12 +102,12 @@ abstract class AbstractOrder extends QUI\QDOM implements OrderInterface, ErpEnti
*
* @var int|bool|string
*/
protected string|int|bool|null $invoiceId = false;
protected string | int | bool | null $invoiceId = false;
/**
* @var string|int|null
*/
protected null|int|string $customerId;
protected null | int | string $customerId;
/**
* @var array|null
......@@ -153,7 +153,7 @@ abstract class AbstractOrder extends QUI\QDOM implements OrderInterface, ErpEnti
*
* @var integer|string
*/
protected int|string $cUser;
protected int | string $cUser;
/**
* @var ArticleList|null
......@@ -1074,7 +1074,7 @@ public function hasDeliveryAddress(): bool
*
* @param array|QUI\ERP\Address $address
*/
public function setDeliveryAddress(array|QUI\ERP\Address $address): void
public function setDeliveryAddress(array | QUI\ERP\Address $address): void
{
if ($address instanceof QUI\ERP\Address) {
$this->addressDelivery = $address->getAttributes();
......@@ -1097,7 +1097,7 @@ public function removeDeliveryAddress(): void
*
* @param array|QUI\ERP\Address|QUI\Users\Address $address
*/
public function setInvoiceAddress(array|QUI\ERP\Address|QUI\Users\Address $address): void
public function setInvoiceAddress(array | QUI\ERP\Address | QUI\Users\Address $address): void
{
if ($address instanceof QUI\Users\Address) {
$this->addressInvoice = $address->getAttributes();
......@@ -1170,7 +1170,7 @@ public function setCurrency(QUI\ERP\Currency\Currency $Currency): void
* @throws QUI\Exception
* @throws ExceptionStack
*/
public function setCustomer(QUI\Interfaces\Users\User|array|User $User): void
public function setCustomer(QUI\Interfaces\Users\User | array | User $User): void
{
$oldCustomerId = $this->customerId;
......@@ -1429,7 +1429,7 @@ public function isPaid(): bool
*
* @todo Payment->canBeUsed() noch implementieren
*/
public function setPayment(int|string $paymentId): void
public function setPayment(int | string $paymentId): void
{
$Payments = Payments::getInstance();
......@@ -2193,7 +2193,7 @@ public function getProcessingStatus(): ?ProcessingStatus\Status
*
* @param int|ProcessingStatus\Status $status
*/
public function setProcessingStatus(ProcessingStatus\Status|int $status): void
public function setProcessingStatus(ProcessingStatus\Status | int $status): void
{
if ($status instanceof ProcessingStatus\Status) {
$Status = $status;
......@@ -2230,7 +2230,7 @@ public function setProcessingStatus(ProcessingStatus\Status|int $status): void
*
* @return QUI\ERP\Shipping\ShippingStatus\Status|null
*/
public function getShippingStatus(): QUI\ERP\Shipping\ShippingStatus\Status|null
public function getShippingStatus(): QUI\ERP\Shipping\ShippingStatus\Status | null
{
if (
!QUI::getPackageManager()->isInstalled('quiqqer/shipping')
......@@ -2265,7 +2265,7 @@ public function getShippingStatus(): QUI\ERP\Shipping\ShippingStatus\Status|null
* @param int|QUI\ERP\Shipping\ShippingStatus\Status $status
* @throws QUI\Exception
*/
public function setShippingStatus(int|QUI\ERP\Shipping\ShippingStatus\Status $status): void
public function setShippingStatus(int | QUI\ERP\Shipping\ShippingStatus\Status $status): void
{
if (!QUI::getPackageManager()->isInstalled('quiqqer/shipping')) {
return;
......
......@@ -27,10 +27,10 @@ public static function addMenuItems(Map $Map): void
if ($Accounting === null) {
$Accounting = new Item([
'icon' => 'fa fa-book',
'name' => 'accounting',
'text' => ['quiqqer/order', 'erp.panel.accounting.text'],
'opened' => true,
'icon' => 'fa fa-book',
'name' => 'accounting',
'text' => ['quiqqer/order', 'erp.panel.accounting.text'],
'opened' => true,
'priority' => 1
]);
......@@ -38,27 +38,27 @@ public static function addMenuItems(Map $Map): void
}
$Order = new Item([
'icon' => 'fa fa-shopping-basket',
'name' => 'order',
'text' => ['quiqqer/order', 'erp.panel.order.text'],
'opened' => true,
'icon' => 'fa fa-shopping-basket',
'name' => 'order',
'text' => ['quiqqer/order', 'erp.panel.order.text'],
'opened' => true,
'priority' => 1
]);
$Order->appendChild(
new Item([
'icon' => 'fa fa-plus',
'name' => 'invoice-create',
'text' => ['quiqqer/order', 'erp.panel.order.create.text'],
'icon' => 'fa fa-plus',
'name' => 'invoice-create',
'text' => ['quiqqer/order', 'erp.panel.order.create.text'],
'require' => 'package/quiqqer/order/bin/backend/utils/ErpMenuOrderCreate'
])
);
$Order->appendChild(
new Item([
'icon' => 'fa fa-shopping-basket',
'name' => 'invoice-drafts',
'text' => ['quiqqer/order', 'erp.panel.order.list.text'],
'icon' => 'fa fa-shopping-basket',
'name' => 'invoice-drafts',
'text' => ['quiqqer/order', 'erp.panel.order.list.text'],
'require' => 'package/quiqqer/order/bin/backend/controls/panels/Orders'
])
);
......@@ -83,28 +83,28 @@ public static function getMailLocale(): array
{
return [
[
'title' => QUI::getLocale()->get('quiqqer/order', 'mail.text.orderConfirmation.title'),
'title' => QUI::getLocale()->get('quiqqer/order', 'mail.text.orderConfirmation.title'),
'description' => QUI::getLocale()->get('quiqqer/order', 'mail.text.orderConfirmation.description'),
'subject' => ['quiqqer/order', 'order.confirmation.subject'],
'content' => ['quiqqer/order', 'order.confirmation.body'],
'subject' => ['quiqqer/order', 'order.confirmation.subject'],
'content' => ['quiqqer/order', 'order.confirmation.body'],
'subject.description' => ['quiqqer/order', 'order.confirmation.subject.description'],
'content.description' => ['quiqqer/order', 'order.confirmation.body.description']
],
[
'title' => QUI::getLocale()->get('quiqqer/order', 'mail.text.orderPaymentSuccess.title'),
'title' => QUI::getLocale()->get('quiqqer/order', 'mail.text.orderPaymentSuccess.title'),
'description' => QUI::getLocale()->get('quiqqer/order', 'mail.text.orderPaymentSuccess.description'),
'subject' => ['quiqqer/order', 'mail.payment_success.body'],
'content' => ['quiqqer/order', 'mail.payment_success.body'],
'subject' => ['quiqqer/order', 'mail.payment_success.body'],
'content' => ['quiqqer/order', 'mail.payment_success.body'],
'subject.description' => ['quiqqer/order', 'mail.description.orderPaymentSuccess.subject'],
'content.description' => ['quiqqer/order', 'mail.description.orderPaymentSuccess.body']
],
[
'title' => QUI::getLocale()->get('quiqqer/order', 'shipping.confirmation.title'),
'title' => QUI::getLocale()->get('quiqqer/order', 'shipping.confirmation.title'),
'description' => QUI::getLocale()->get('quiqqer/order', 'shipping.confirmation.description'),
'subject' => ['quiqqer/order', 'shipping.order.mail.subject'],
'content' => ['quiqqer/order', 'shipping.order.mail.body'],
'subject' => ['quiqqer/order', 'shipping.order.mail.subject'],
'content' => ['quiqqer/order', 'shipping.order.mail.body'],
'subject.description' => ['quiqqer/order', 'mail.description.shipping.confirmation.subject'],
'content.description' => ['quiqqer/order', 'mail.description.shipping.confirmation.body']
......
......@@ -581,7 +581,7 @@ protected static function getOrderLocaleVar(OrderInterface $Order, QUI\Interface
* @param $date
* @return false|string
*/
public static function dateFormat($date): bool|string
public static function dateFormat($date): bool | string
{
// date
$localeCode = QUI::getLocale()->getLocalesByLang(
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren