From 48e495bca5e64d43fb8ab93064e39d07a4c27b7f Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Thu, 11 Jun 2026 16:49:12 +0100 Subject: [PATCH] Migrate all source-file headers to SPDX format --- AGENTS.md | 2 +- app/code/community/Maho/NetsEasy/Block/Checkout.php | 12 +++++------- app/code/community/Maho/NetsEasy/Block/Form.php | 12 +++++------- app/code/community/Maho/NetsEasy/Block/Info.php | 12 +++++------- app/code/community/Maho/NetsEasy/Block/Redirect.php | 12 +++++------- app/code/community/Maho/NetsEasy/Helper/Data.php | 12 +++++------- .../community/Maho/NetsEasy/Model/Api/Client.php | 12 +++++------- .../Maho/NetsEasy/Model/Api/Dto/AbstractRequest.php | 12 +++++------- .../Maho/NetsEasy/Model/Api/Dto/ChargeRequest.php | 12 +++++------- .../Maho/NetsEasy/Model/Api/Dto/ChargeResponse.php | 12 +++++------- .../NetsEasy/Model/Api/Dto/CreatePaymentRequest.php | 12 +++++------- .../Maho/NetsEasy/Model/Api/Dto/OrderItem.php | 12 +++++------- .../Maho/NetsEasy/Model/Api/Dto/PaymentResponse.php | 12 +++++------- .../Maho/NetsEasy/Model/Api/Dto/RefundRequest.php | 12 +++++------- .../Maho/NetsEasy/Model/Api/Dto/RefundResponse.php | 12 +++++------- .../community/Maho/NetsEasy/Model/Api/Payment.php | 12 +++++------- app/code/community/Maho/NetsEasy/Model/Locale.php | 12 +++++------- app/code/community/Maho/NetsEasy/Model/Observer.php | 12 +++++------- app/code/community/Maho/NetsEasy/Model/Payment.php | 12 +++++------- .../Maho/NetsEasy/Model/Source/CheckoutFlow.php | 12 +++++------- .../Maho/NetsEasy/Model/Source/Environment.php | 12 +++++------- .../Maho/NetsEasy/Model/Source/PaymentAction.php | 12 +++++------- .../Maho/NetsEasy/controllers/PaymentController.php | 12 +++++------- .../Maho/NetsEasy/controllers/WebhookController.php | 12 +++++------- app/code/community/Maho/NetsEasy/etc/config.xml | 10 ++-------- app/code/community/Maho/NetsEasy/etc/system.xml | 10 ++-------- .../sql/maho_netseasy_setup/install-1.0.0.php | 12 +++++------- .../frontend/base/default/layout/maho_netseasy.xml | 9 ++------- .../default/template/maho/netseasy/checkout.phtml | 8 +++----- .../base/default/template/maho/netseasy/form.phtml | 8 +++----- .../base/default/template/maho/netseasy/info.phtml | 8 +++----- .../default/template/maho/netseasy/redirect.phtml | 8 +++----- app/etc/modules/Maho_NetsEasy.xml | 10 ++-------- public/js/maho/netseasy.js | 9 ++------- 34 files changed, 143 insertions(+), 227 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index deeb38e..3c3115f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -57,4 +57,4 @@ Single custom table `netseasy_payment` (setup in `sql/maho_netseasy_setup/instal - Private helper accessors pattern: `private function getHelper()`, `private function getApiPayment()` - Logging goes to `netseasy.log` file - Translations via `app/locale/en_US/Maho_NetsEasy.csv` -- License header: OSL-3.0, copyright Maho (https://mahocommerce.com) +- License header: SPDX format. PHP/phtml/JS/XML carry `SPDX-FileCopyrightText: 2026 Maho ` and `SPDX-License-Identifier: OSL-3.0`. PHP/phtml keep the SPDX block inside the top `/** */` docblock with `@package Maho_NetsEasy`; XML uses a plain `` comment (no `@package`); JS uses `//` line comments. diff --git a/app/code/community/Maho/NetsEasy/Block/Checkout.php b/app/code/community/Maho/NetsEasy/Block/Checkout.php index e008de1..5967b08 100644 --- a/app/code/community/Maho/NetsEasy/Block/Checkout.php +++ b/app/code/community/Maho/NetsEasy/Block/Checkout.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Block_Checkout extends Mage_Core_Block_Template { #[\Override] diff --git a/app/code/community/Maho/NetsEasy/Block/Form.php b/app/code/community/Maho/NetsEasy/Block/Form.php index 63aec8c..c4f1295 100644 --- a/app/code/community/Maho/NetsEasy/Block/Form.php +++ b/app/code/community/Maho/NetsEasy/Block/Form.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Block_Form extends Mage_Payment_Block_Form { #[\Override] diff --git a/app/code/community/Maho/NetsEasy/Block/Info.php b/app/code/community/Maho/NetsEasy/Block/Info.php index 4cb2875..bf0b367 100644 --- a/app/code/community/Maho/NetsEasy/Block/Info.php +++ b/app/code/community/Maho/NetsEasy/Block/Info.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Block_Info extends Mage_Payment_Block_Info { #[\Override] diff --git a/app/code/community/Maho/NetsEasy/Block/Redirect.php b/app/code/community/Maho/NetsEasy/Block/Redirect.php index b83093e..d43f25e 100644 --- a/app/code/community/Maho/NetsEasy/Block/Redirect.php +++ b/app/code/community/Maho/NetsEasy/Block/Redirect.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Block_Redirect extends Mage_Core_Block_Template { #[\Override] diff --git a/app/code/community/Maho/NetsEasy/Helper/Data.php b/app/code/community/Maho/NetsEasy/Helper/Data.php index 9519422..9b2057a 100644 --- a/app/code/community/Maho/NetsEasy/Helper/Data.php +++ b/app/code/community/Maho/NetsEasy/Helper/Data.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Helper_Data extends Mage_Core_Helper_Abstract { protected $_moduleName = 'Maho_NetsEasy'; diff --git a/app/code/community/Maho/NetsEasy/Model/Api/Client.php b/app/code/community/Maho/NetsEasy/Model/Api/Client.php index 541e45e..5ccd9f6 100644 --- a/app/code/community/Maho/NetsEasy/Model/Api/Client.php +++ b/app/code/community/Maho/NetsEasy/Model/Api/Client.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + use Symfony\Component\HttpClient\HttpClient; use Symfony\Contracts\HttpClient\HttpClientInterface; diff --git a/app/code/community/Maho/NetsEasy/Model/Api/Dto/AbstractRequest.php b/app/code/community/Maho/NetsEasy/Model/Api/Dto/AbstractRequest.php index c4b7108..d7c5da1 100644 --- a/app/code/community/Maho/NetsEasy/Model/Api/Dto/AbstractRequest.php +++ b/app/code/community/Maho/NetsEasy/Model/Api/Dto/AbstractRequest.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + abstract class Maho_NetsEasy_Model_Api_Dto_AbstractRequest { abstract public function toArray(): array; diff --git a/app/code/community/Maho/NetsEasy/Model/Api/Dto/ChargeRequest.php b/app/code/community/Maho/NetsEasy/Model/Api/Dto/ChargeRequest.php index 1137dc6..025b06f 100644 --- a/app/code/community/Maho/NetsEasy/Model/Api/Dto/ChargeRequest.php +++ b/app/code/community/Maho/NetsEasy/Model/Api/Dto/ChargeRequest.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Api_Dto_ChargeRequest extends Maho_NetsEasy_Model_Api_Dto_AbstractRequest { /** @var Maho_NetsEasy_Model_Api_Dto_OrderItem[] */ diff --git a/app/code/community/Maho/NetsEasy/Model/Api/Dto/ChargeResponse.php b/app/code/community/Maho/NetsEasy/Model/Api/Dto/ChargeResponse.php index 2b4c270..0450f17 100644 --- a/app/code/community/Maho/NetsEasy/Model/Api/Dto/ChargeResponse.php +++ b/app/code/community/Maho/NetsEasy/Model/Api/Dto/ChargeResponse.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Api_Dto_ChargeResponse { public function __construct( diff --git a/app/code/community/Maho/NetsEasy/Model/Api/Dto/CreatePaymentRequest.php b/app/code/community/Maho/NetsEasy/Model/Api/Dto/CreatePaymentRequest.php index a474ddc..3bc20f2 100644 --- a/app/code/community/Maho/NetsEasy/Model/Api/Dto/CreatePaymentRequest.php +++ b/app/code/community/Maho/NetsEasy/Model/Api/Dto/CreatePaymentRequest.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Api_Dto_CreatePaymentRequest extends Maho_NetsEasy_Model_Api_Dto_AbstractRequest { /** @var Maho_NetsEasy_Model_Api_Dto_OrderItem[] */ diff --git a/app/code/community/Maho/NetsEasy/Model/Api/Dto/OrderItem.php b/app/code/community/Maho/NetsEasy/Model/Api/Dto/OrderItem.php index 65dbf64..5e1f0a0 100644 --- a/app/code/community/Maho/NetsEasy/Model/Api/Dto/OrderItem.php +++ b/app/code/community/Maho/NetsEasy/Model/Api/Dto/OrderItem.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Api_Dto_OrderItem { public function __construct( diff --git a/app/code/community/Maho/NetsEasy/Model/Api/Dto/PaymentResponse.php b/app/code/community/Maho/NetsEasy/Model/Api/Dto/PaymentResponse.php index 0bd964f..d3b8d24 100644 --- a/app/code/community/Maho/NetsEasy/Model/Api/Dto/PaymentResponse.php +++ b/app/code/community/Maho/NetsEasy/Model/Api/Dto/PaymentResponse.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Api_Dto_PaymentResponse { public function __construct( diff --git a/app/code/community/Maho/NetsEasy/Model/Api/Dto/RefundRequest.php b/app/code/community/Maho/NetsEasy/Model/Api/Dto/RefundRequest.php index d02eeaa..af13828 100644 --- a/app/code/community/Maho/NetsEasy/Model/Api/Dto/RefundRequest.php +++ b/app/code/community/Maho/NetsEasy/Model/Api/Dto/RefundRequest.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Api_Dto_RefundRequest extends Maho_NetsEasy_Model_Api_Dto_AbstractRequest { /** @var Maho_NetsEasy_Model_Api_Dto_OrderItem[] */ diff --git a/app/code/community/Maho/NetsEasy/Model/Api/Dto/RefundResponse.php b/app/code/community/Maho/NetsEasy/Model/Api/Dto/RefundResponse.php index d95e6c1..a645b81 100644 --- a/app/code/community/Maho/NetsEasy/Model/Api/Dto/RefundResponse.php +++ b/app/code/community/Maho/NetsEasy/Model/Api/Dto/RefundResponse.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Api_Dto_RefundResponse { public function __construct( diff --git a/app/code/community/Maho/NetsEasy/Model/Api/Payment.php b/app/code/community/Maho/NetsEasy/Model/Api/Payment.php index 652516b..3636e9a 100644 --- a/app/code/community/Maho/NetsEasy/Model/Api/Payment.php +++ b/app/code/community/Maho/NetsEasy/Model/Api/Payment.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Api_Payment { private function getClient(): Maho_NetsEasy_Model_Api_Client diff --git a/app/code/community/Maho/NetsEasy/Model/Locale.php b/app/code/community/Maho/NetsEasy/Model/Locale.php index a00c3ce..32aed47 100644 --- a/app/code/community/Maho/NetsEasy/Model/Locale.php +++ b/app/code/community/Maho/NetsEasy/Model/Locale.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + /** * Locale, currency validation, and country code mapping for Nets Easy API */ diff --git a/app/code/community/Maho/NetsEasy/Model/Observer.php b/app/code/community/Maho/NetsEasy/Model/Observer.php index e6cf06f..31cd0bc 100644 --- a/app/code/community/Maho/NetsEasy/Model/Observer.php +++ b/app/code/community/Maho/NetsEasy/Model/Observer.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Observer { /** diff --git a/app/code/community/Maho/NetsEasy/Model/Payment.php b/app/code/community/Maho/NetsEasy/Model/Payment.php index c5f269c..1f02d97 100644 --- a/app/code/community/Maho/NetsEasy/Model/Payment.php +++ b/app/code/community/Maho/NetsEasy/Model/Payment.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Payment extends Mage_Payment_Model_Method_Abstract { protected $_code = 'netseasy'; diff --git a/app/code/community/Maho/NetsEasy/Model/Source/CheckoutFlow.php b/app/code/community/Maho/NetsEasy/Model/Source/CheckoutFlow.php index 01ac716..233a558 100644 --- a/app/code/community/Maho/NetsEasy/Model/Source/CheckoutFlow.php +++ b/app/code/community/Maho/NetsEasy/Model/Source/CheckoutFlow.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Source_CheckoutFlow { public const EMBEDDED = 'embedded'; diff --git a/app/code/community/Maho/NetsEasy/Model/Source/Environment.php b/app/code/community/Maho/NetsEasy/Model/Source/Environment.php index f2e1a7c..8b7961e 100644 --- a/app/code/community/Maho/NetsEasy/Model/Source/Environment.php +++ b/app/code/community/Maho/NetsEasy/Model/Source/Environment.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Source_Environment { public const TEST = 'test'; diff --git a/app/code/community/Maho/NetsEasy/Model/Source/PaymentAction.php b/app/code/community/Maho/NetsEasy/Model/Source/PaymentAction.php index 358d2e4..4dbc78b 100644 --- a/app/code/community/Maho/NetsEasy/Model/Source/PaymentAction.php +++ b/app/code/community/Maho/NetsEasy/Model/Source/PaymentAction.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_Model_Source_PaymentAction { public function toOptionArray(): array diff --git a/app/code/community/Maho/NetsEasy/controllers/PaymentController.php b/app/code/community/Maho/NetsEasy/controllers/PaymentController.php index 7d11240..1b90361 100644 --- a/app/code/community/Maho/NetsEasy/controllers/PaymentController.php +++ b/app/code/community/Maho/NetsEasy/controllers/PaymentController.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_PaymentController extends Mage_Core_Controller_Front_Action { private function _getCheckoutSession(): Mage_Checkout_Model_Session diff --git a/app/code/community/Maho/NetsEasy/controllers/WebhookController.php b/app/code/community/Maho/NetsEasy/controllers/WebhookController.php index 3949b0e..4b5ce78 100644 --- a/app/code/community/Maho/NetsEasy/controllers/WebhookController.php +++ b/app/code/community/Maho/NetsEasy/controllers/WebhookController.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + class Maho_NetsEasy_WebhookController extends Mage_Core_Controller_Front_Action { #[\Override] diff --git a/app/code/community/Maho/NetsEasy/etc/config.xml b/app/code/community/Maho/NetsEasy/etc/config.xml index 4048591..8e8b0d0 100644 --- a/app/code/community/Maho/NetsEasy/etc/config.xml +++ b/app/code/community/Maho/NetsEasy/etc/config.xml @@ -1,13 +1,7 @@ diff --git a/app/code/community/Maho/NetsEasy/etc/system.xml b/app/code/community/Maho/NetsEasy/etc/system.xml index ae6e0da..6bfbf5c 100644 --- a/app/code/community/Maho/NetsEasy/etc/system.xml +++ b/app/code/community/Maho/NetsEasy/etc/system.xml @@ -1,13 +1,7 @@ diff --git a/app/code/community/Maho/NetsEasy/sql/maho_netseasy_setup/install-1.0.0.php b/app/code/community/Maho/NetsEasy/sql/maho_netseasy_setup/install-1.0.0.php index 799ef11..7f05e5a 100644 --- a/app/code/community/Maho/NetsEasy/sql/maho_netseasy_setup/install-1.0.0.php +++ b/app/code/community/Maho/NetsEasy/sql/maho_netseasy_setup/install-1.0.0.php @@ -1,15 +1,13 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ +declare(strict_types=1); + /** @var Mage_Core_Model_Resource_Setup $this */ $installer = $this; $installer->startSetup(); diff --git a/app/design/frontend/base/default/layout/maho_netseasy.xml b/app/design/frontend/base/default/layout/maho_netseasy.xml index b4cb59a..567ad18 100644 --- a/app/design/frontend/base/default/layout/maho_netseasy.xml +++ b/app/design/frontend/base/default/layout/maho_netseasy.xml @@ -1,12 +1,7 @@ diff --git a/app/design/frontend/base/default/template/maho/netseasy/checkout.phtml b/app/design/frontend/base/default/template/maho/netseasy/checkout.phtml index b9445f0..66be14a 100644 --- a/app/design/frontend/base/default/template/maho/netseasy/checkout.phtml +++ b/app/design/frontend/base/default/template/maho/netseasy/checkout.phtml @@ -1,10 +1,8 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ /** @var Maho_NetsEasy_Block_Checkout $this */ diff --git a/app/design/frontend/base/default/template/maho/netseasy/form.phtml b/app/design/frontend/base/default/template/maho/netseasy/form.phtml index b5a2482..e4d3e93 100644 --- a/app/design/frontend/base/default/template/maho/netseasy/form.phtml +++ b/app/design/frontend/base/default/template/maho/netseasy/form.phtml @@ -1,10 +1,8 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ /** @var Maho_NetsEasy_Block_Form $this */ diff --git a/app/design/frontend/base/default/template/maho/netseasy/info.phtml b/app/design/frontend/base/default/template/maho/netseasy/info.phtml index 13cba75..aff3278 100644 --- a/app/design/frontend/base/default/template/maho/netseasy/info.phtml +++ b/app/design/frontend/base/default/template/maho/netseasy/info.phtml @@ -1,10 +1,8 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ /** @var Maho_NetsEasy_Block_Info $this */ diff --git a/app/design/frontend/base/default/template/maho/netseasy/redirect.phtml b/app/design/frontend/base/default/template/maho/netseasy/redirect.phtml index 12a7c5b..e8ac6ce 100644 --- a/app/design/frontend/base/default/template/maho/netseasy/redirect.phtml +++ b/app/design/frontend/base/default/template/maho/netseasy/redirect.phtml @@ -1,10 +1,8 @@ + * SPDX-License-Identifier: OSL-3.0 + * @package Maho_NetsEasy */ /** @var Maho_NetsEasy_Block_Redirect $this */ diff --git a/app/etc/modules/Maho_NetsEasy.xml b/app/etc/modules/Maho_NetsEasy.xml index 0407382..5c0746e 100644 --- a/app/etc/modules/Maho_NetsEasy.xml +++ b/app/etc/modules/Maho_NetsEasy.xml @@ -1,13 +1,7 @@ diff --git a/public/js/maho/netseasy.js b/public/js/maho/netseasy.js index a17560f..929ac64 100644 --- a/public/js/maho/netseasy.js +++ b/public/js/maho/netseasy.js @@ -1,10 +1,5 @@ -/** - * Maho - * - * @package Maho_NetsEasy - * @copyright Copyright (c) 2026 Maho (https://mahocommerce.com) - * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) - */ +// SPDX-FileCopyrightText: 2026 Maho +// SPDX-License-Identifier: OSL-3.0 (function () { 'use strict';