Skip to content

Commit

Permalink
ps_version condition checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mandan2 committed Nov 20, 2023
1 parent 6b4ffb4 commit 218b8cd
Show file tree
Hide file tree
Showing 287 changed files with 1,144 additions and 1 deletion.
4 changes: 4 additions & 0 deletions controllers/admin/AdminMollieAjaxController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
use Mollie\Utility\NumberUtility;
use Mollie\Utility\TimeUtility;

if (!defined('_PS_VERSION_')) {
exit;
}

class AdminMollieAjaxController extends ModuleAdminController
{
/** @var Mollie */
Expand Down
4 changes: 4 additions & 0 deletions controllers/admin/AdminMollieModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

use Mollie\Bootstrap\ModuleTabs;

if (!defined('_PS_VERSION_')) {
exit;
}

class AdminMollieModuleController extends ModuleAdminController
{
public function init()
Expand Down
4 changes: 4 additions & 0 deletions controllers/admin/AdminMollieSettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
use PrestaShop\PsAccountsInstaller\Installer\Facade\PsAccounts;
use PrestaShop\PsAccountsInstaller\Installer\Installer as PsAccountsInstaller;

if (!defined('_PS_VERSION_')) {
exit;
}

class AdminMollieSettingsController extends ModuleAdminController
{
const FILE_NAME = 'AdminMollieSettingsController';
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
use Mollie\Repository\CurrencyRepositoryInterface;
use Mollie\Utility\NumberUtility;

if (!defined('_PS_VERSION_')) {
exit;
}

class MollieAjaxModuleFrontController extends AbstractMollieController
{
const FILE_NAME = 'ajax';
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/applePayDirectAjax.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
use Mollie\Builder\ApplePayDirect\ApplePayProductBuilder;
use Mollie\Utility\OrderRecoverUtility;

if (!defined('_PS_VERSION_')) {
exit;
}

class MollieApplePayDirectAjaxModuleFrontController extends ModuleFrontController
{
/** @var Mollie */
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/bancontactAjax.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
use Mollie\Utility\OrderNumberUtility;
use Mollie\Utility\OrderRecoverUtility;

if (!defined('_PS_VERSION_')) {
exit;
}

class MollieBancontactAjaxModuleFrontController extends ModuleFrontController
{
/** @var Mollie */
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/fail.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

use PrestaShop\PrestaShop\Adapter\Order\OrderPresenter;

if (!defined('_PS_VERSION_')) {
exit;
}

class MollieFailModuleFrontController extends ModuleFrontController
{
/**
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/payScreen.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
use Mollie\Api\Types\PaymentMethod;
use Mollie\Provider\ProfileIdProviderInterface;

if (!defined('_PS_VERSION_')) {
exit;
}

class MolliePayScreenModuleFrontController extends ModuleFrontController
{
/** @var Mollie */
Expand Down
2 changes: 1 addition & 1 deletion controllers/front/payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use Mollie\Utility\OrderNumberUtility;

if (!defined('_PS_VERSION_')) {
return;
exit;
}

require_once dirname(__FILE__) . '/../../mollie.php';
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/return.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
use Mollie\Utility\TransactionUtility;
use Mollie\Validator\OrderCallBackValidator;

if (!defined('_PS_VERSION_')) {
exit;
}

require_once dirname(__FILE__) . '/../../mollie.php';

class MollieReturnModuleFrontController extends AbstractMollieController
Expand Down
4 changes: 4 additions & 0 deletions controllers/front/webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
use Mollie\Service\TransactionService;
use Mollie\Utility\TransactionUtility;

if (!defined('_PS_VERSION_')) {
exit;
}

require_once dirname(__FILE__) . '/../../mollie.php';

class MollieWebhookModuleFrontController extends AbstractMollieController
Expand Down
4 changes: 4 additions & 0 deletions mollie.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
use PrestaShop\PrestaShop\Core\Localization\Locale\Repository;
use PrestaShop\PsAccountsInstaller\Installer\Installer as PsAccountsInstaller;

if (!defined('_PS_VERSION_')) {
exit;
}

require_once __DIR__ . '/vendor/autoload.php';

class Mollie extends PaymentModule
Expand Down
4 changes: 4 additions & 0 deletions src/Adapter/API/CurlPSMollieHttpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
use Mollie\Api\HttpAdapter\MollieHttpAdapterInterface;
use Mollie\Api\MollieApiClient;

if (!defined('_PS_VERSION_')) {
exit;
}

final class CurlPSMollieHttpAdapter implements MollieHttpAdapterInterface
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Adapter/ConfigurationAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
use Mollie\Config\Config;
use Shop;

if (!defined('_PS_VERSION_')) {
exit;
}

class ConfigurationAdapter
{
public function get($key, $idShop = null, $idLang = null, $idShopGroup = null)
Expand Down
4 changes: 4 additions & 0 deletions src/Adapter/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
use Configuration as PrestashopConfiguration;
use Context as PrestaShopContext;

if (!defined('_PS_VERSION_')) {
exit;
}

class Context
{
public function getContext()
Expand Down
4 changes: 4 additions & 0 deletions src/Adapter/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

use Language as PrestashopLanguage;

if (!defined('_PS_VERSION_')) {
exit;
}

class Language
{
public function getAllLanguages(): array
Expand Down
4 changes: 4 additions & 0 deletions src/Adapter/Tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

use Tab as PrestashopTab;

if (!defined('_PS_VERSION_')) {
exit;
}

class Tab
{
public function initTab(int $idTab = null): PrestashopTab
Expand Down
4 changes: 4 additions & 0 deletions src/Adapter/ToolsAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
use Currency;
use Tools;

if (!defined('_PS_VERSION_')) {
exit;
}

class ToolsAdapter
{
public function strtoupper($str)
Expand Down
4 changes: 4 additions & 0 deletions src/Application/Command/CreateApplePayOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

use Mollie\DTO\ApplePay\Order;

if (!defined('_PS_VERSION_')) {
exit;
}

final class CreateApplePayOrder
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Application/Command/RequestApplePayPaymentSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

namespace Mollie\Application\Command;

if (!defined('_PS_VERSION_')) {
exit;
}

final class RequestApplePayPaymentSession
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Application/Command/UpdateApplePayShippingContact.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

use Mollie\DTO\ApplePay\Product;

if (!defined('_PS_VERSION_')) {
exit;
}

final class UpdateApplePayShippingContact
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Application/Command/UpdateApplePayShippingMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

namespace Mollie\Application\Command;

if (!defined('_PS_VERSION_')) {
exit;
}

final class UpdateApplePayShippingMethod
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Application/CommandHandler/CreateApplePayOrderHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
use Order;
use Tools;

if (!defined('_PS_VERSION_')) {
exit;
}

final class CreateApplePayOrderHandler
{
const FILE_NAME = 'CreateApplePayOrderHandler';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
use Mollie\Factory\ModuleFactory;
use Mollie\Service\ApiServiceInterface;

if (!defined('_PS_VERSION_')) {
exit;
}

final class RequestApplePayPaymentSessionHandler
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
use Mollie\Utility\ApplePayDirect\ShippingMethodUtility;
use Tools;

if (!defined('_PS_VERSION_')) {
exit;
}

final class UpdateApplePayShippingContactHandler
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
use Mollie\Config\Config;
use Mollie\Service\OrderPaymentFeeService;

if (!defined('_PS_VERSION_')) {
exit;
}

final class UpdateApplePayShippingMethodHandler
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Bootstrap/ModuleTabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

use Mollie\Factory\ModuleFactory;

if (!defined('_PS_VERSION_')) {
exit;
}

class ModuleTabs
{
const SELF_NAME = 'ModuleTabs';
Expand Down
4 changes: 4 additions & 0 deletions src/Builder/ApiTestFeedbackBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
use Mollie\Api\Resources\MethodCollection;
use Mollie\Service\ApiKeyService;

if (!defined('_PS_VERSION_')) {
exit;
}

class ApiTestFeedbackBuilder implements TemplateBuilderInterface
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Builder/ApplePayDirect/ApplePayCarriersBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
use Carrier;
use Mollie\DTO\ApplePay\Carrier\Carrier as AppleCarrier;

if (!defined('_PS_VERSION_')) {
exit;
}

class ApplePayCarriersBuilder
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Builder/ApplePayDirect/ApplePayOrderBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
use Mollie\DTO\ApplePay\Product;
use Mollie\DTO\ApplePay\ShippingContent;

if (!defined('_PS_VERSION_')) {
exit;
}

class ApplePayOrderBuilder
{
public function build(array $products, array $shippingContent, array $billingContent): Order
Expand Down
4 changes: 4 additions & 0 deletions src/Builder/ApplePayDirect/ApplePayProductBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

use Mollie\DTO\ApplePay\Product;

if (!defined('_PS_VERSION_')) {
exit;
}

class ApplePayProductBuilder
{
public function build(array $productParams): array
Expand Down
4 changes: 4 additions & 0 deletions src/Builder/Content/BaseInfoBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
use Mollie\Builder\TemplateBuilderInterface;
use Mollie\Factory\ModuleFactory;

if (!defined('_PS_VERSION_')) {
exit;
}

class BaseInfoBlock implements TemplateBuilderInterface
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Builder/Content/LogoInfoBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
use Mollie\Builder\TemplateBuilderInterface;
use Mollie\Factory\ModuleFactory;

if (!defined('_PS_VERSION_')) {
exit;
}

class LogoInfoBlock implements TemplateBuilderInterface
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Builder/Content/PaymentOption/IdealDropdownInfoBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
use Mollie\Builder\TemplateBuilderInterface;
use Mollie\Service\IssuerService;

if (!defined('_PS_VERSION_')) {
exit;
}

class IdealDropdownInfoBlock implements TemplateBuilderInterface
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Builder/Content/UpdateMessageInfoBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
use Mollie\Provider\UpdateMessageProviderInterface;
use Mollie\Service\UpgradeNoticeService;

if (!defined('_PS_VERSION_')) {
exit;
}

class UpdateMessageInfoBlock implements TemplateBuilderInterface
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Builder/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
use OrderStateCore as OrderState;
use ToolsCore as Tools;

if (!defined('_PS_VERSION_')) {
exit;
}

class FormBuilder
{
const FILE_NAME = 'FormBuilder';
Expand Down
Loading

0 comments on commit 218b8cd

Please sign in to comment.