From 20f3e91984138e7b6aad487aac9348caf33553e4 Mon Sep 17 00:00:00 2001 From: DevSviat Date: Sat, 24 Oct 2026 16:23:43 +0300 Subject: [PATCH] =?UTF-8?q?chore:=20Rector=20=E2=80=94=20=D1=81=D0=B8?= =?UTF-8?q?=D0=BD=D1=82=D0=B0=D0=BA=D1=81=D0=B8=D1=87=D0=BD=D1=96=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D0=B0;=20=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D1=81=D1=96=D1=8F=201.0.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ті самі 19 правил, що в ядрі форку (rector.php): array() → [], list() → [], isset() ? : → ??, стрілкові функції, intval(...) замість \x27intval\x27, new X()->m(), типи private-констант, catch без невикористаної змінної. Сигнатур, видимості й типів властивостей не міняє. --- Backend/Controllers/DescriptionAdmin.php | 4 ++-- Controllers/CompanyByEdrpouController.php | 2 +- Controllers/InvoicePrintController.php | 2 +- Extenders/BackendExtender.php | 2 +- Extenders/FrontExtender.php | 2 +- Init/Init.php | 10 +++++----- Init/module.json | 2 +- PaymentForm.php | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Backend/Controllers/DescriptionAdmin.php b/Backend/Controllers/DescriptionAdmin.php index 006e008..2e4fcb0 100644 --- a/Backend/Controllers/DescriptionAdmin.php +++ b/Backend/Controllers/DescriptionAdmin.php @@ -6,9 +6,9 @@ class DescriptionAdmin extends IndexAdmin { - private const SETTING_PREFIX = 'sviat__invoice_payment__'; + private const string SETTING_PREFIX = 'sviat__invoice_payment__'; - private const INVOICE_SETTING_KEYS = [ + private const array INVOICE_SETTING_KEYS = [ 'supplier_type', 'supplier_name', 'supplier_bank_account', diff --git a/Controllers/CompanyByEdrpouController.php b/Controllers/CompanyByEdrpouController.php index e9245a7..ddb21cd 100644 --- a/Controllers/CompanyByEdrpouController.php +++ b/Controllers/CompanyByEdrpouController.php @@ -6,7 +6,7 @@ class CompanyByEdrpouController extends AbstractController { - private const API_URL = 'https://adm.tools/action/gov/api/?egrpou=%s'; + private const string API_URL = 'https://adm.tools/action/gov/api/?egrpou=%s'; public function getCompany() { diff --git a/Controllers/InvoicePrintController.php b/Controllers/InvoicePrintController.php index f114cc6..123dcfb 100644 --- a/Controllers/InvoicePrintController.php +++ b/Controllers/InvoicePrintController.php @@ -12,7 +12,7 @@ class InvoicePrintController extends AbstractController { - private const MODULE_NAME = 'Sviat/InvoicePayment'; + private const string MODULE_NAME = 'Sviat/InvoicePayment'; public function render( OrdersEntity $ordersEntity, diff --git a/Extenders/BackendExtender.php b/Extenders/BackendExtender.php index 90500a3..022f87c 100644 --- a/Extenders/BackendExtender.php +++ b/Extenders/BackendExtender.php @@ -13,7 +13,7 @@ class BackendExtender implements ExtensionInterface { - private const MODULE_NAME = 'Sviat/InvoicePayment'; + private const string MODULE_NAME = 'Sviat/InvoicePayment'; private EntityFactory $entityFactory; private Design $design; diff --git a/Extenders/FrontExtender.php b/Extenders/FrontExtender.php index bd80685..2da6cd7 100644 --- a/Extenders/FrontExtender.php +++ b/Extenders/FrontExtender.php @@ -15,7 +15,7 @@ class FrontExtender implements ExtensionInterface { - private const MODULE_NAME = 'Sviat/InvoicePayment'; + private const string MODULE_NAME = 'Sviat/InvoicePayment'; private EntityFactory $entityFactory; private Request $request; diff --git a/Init/Init.php b/Init/Init.php index 86ab86f..8fa3ef7 100644 --- a/Init/Init.php +++ b/Init/Init.php @@ -21,11 +21,11 @@ public function install() $this->setBackendMainController('DescriptionAdmin'); $this->migrateEntityTable(InvoicePaymentDataEntity::class, [ - (new EntityField('id'))->setIndexPrimaryKey()->setTypeInt(11, false)->setAutoIncrement(), - (new EntityField('order_id'))->setTypeInt(11)->setIndexUnique(), - (new EntityField('edrpou'))->setTypeVarchar(20), - (new EntityField('company_name'))->setTypeVarchar(500), - (new EntityField('paid'))->setTypeTinyInt(1, true), + new EntityField('id')->setIndexPrimaryKey()->setTypeInt(11, false)->setAutoIncrement(), + new EntityField('order_id')->setTypeInt(11)->setIndexUnique(), + new EntityField('edrpou')->setTypeVarchar(20), + new EntityField('company_name')->setTypeVarchar(500), + new EntityField('paid')->setTypeTinyInt(1, true), ]); } diff --git a/Init/module.json b/Init/module.json index 1c86db8..b76b5db 100644 --- a/Init/module.json +++ b/Init/module.json @@ -1,6 +1,6 @@ { "Okay": "4.5.3", - "version": "1.0.2", + "version": "1.0.3", "moduleName": "Invoice Payment", "vendor": { "email": "devsviat@proton.me", diff --git a/PaymentForm.php b/PaymentForm.php index 9a09f73..36328fc 100644 --- a/PaymentForm.php +++ b/PaymentForm.php @@ -12,7 +12,7 @@ class PaymentForm extends AbstractModule implements PaymentFormInterface { - private const MODULE_NAME = 'Sviat/InvoicePayment'; + private const string MODULE_NAME = 'Sviat/InvoicePayment'; private EntityFactory $entityFactory;