diff --git a/actions/core.php b/actions/core.php index 9dd40f8..f1570a7 100644 --- a/actions/core.php +++ b/actions/core.php @@ -41,7 +41,7 @@ class core * @param config $config Config object * @param language $language Language user object * @param \skouat\ppde\notification\core $notification PPDE Notification object - * @param path_helper $path_helper Path helper object + * @param path_helper $path_helper Path helpers object * @param \skouat\ppde\entity\transactions $ppde_entity_transaction Transaction entity object * @param \skouat\ppde\operators\transactions $ppde_operator_transaction Transaction operator object * @param dispatcher_interface $dispatcher Dispatcher object diff --git a/actions/post_data.php b/actions/post_data.php index a54b49e..bef55f8 100644 --- a/actions/post_data.php +++ b/actions/post_data.php @@ -12,27 +12,27 @@ use phpbb\language\language; use phpbb\request\request; -use skouat\ppde\operators\compare; +use skouat\ppde\helpers\compare_helper; class post_data { private const ASCII_RANGE = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; protected $language; - protected $ppde_operator_compare; + protected $compare_helper; protected $request; /** * Constructor * - * @param language $language Language object - * @param compare $ppde_operator_compare Compare operator object - * @param request $request Request object + * @param language $language Language object + * @param compare_helper $compare_helper Compare operator object + * @param request $request Request object */ - public function __construct(language $language, compare $ppde_operator_compare, request $request) + public function __construct(language $language, compare_helper $compare_helper, request $request) { $this->language = $language; - $this->ppde_operator_compare = $ppde_operator_compare; + $this->compare_helper = $compare_helper; $this->request = $request; } @@ -136,7 +136,7 @@ public function call_func(array $data_ary): array */ public function check_post_data_length($value, $statement): bool { - return $this->ppde_operator_compare->compare_value(strlen($value), $statement['value'], $statement['operator']); + return $this->compare_helper->compare_value(strlen($value), $statement['value'], $statement['operator']); } /** diff --git a/config/actions.yml b/config/actions.yml index 21180c3..91c363d 100644 --- a/config/actions.yml +++ b/config/actions.yml @@ -39,7 +39,7 @@ services: class: skouat\ppde\actions\post_data arguments: - '@language' - - '@skouat.ppde.operator.compare' + - '@skouat.ppde.helpers.compare' - '@request' skouat.ppde.actions.vars: diff --git a/config/controllers.yml b/config/controllers.yml index 3293dc2..747b5f6 100644 --- a/config/controllers.yml +++ b/config/controllers.yml @@ -52,7 +52,7 @@ services: arguments: - '@config' - '@service_container' - - '@controller.helper' + - '@controller.helpers' - '@language' - '@skouat.ppde.actions.auth' - '@skouat.ppde.actions.currency' diff --git a/config/includes.yml b/config/helpers.yml similarity index 63% rename from config/includes.yml rename to config/helpers.yml index f3b9c1b..8bb29fd 100644 --- a/config/includes.yml +++ b/config/helpers.yml @@ -1,5 +1,8 @@ services: - skouat.ppde.includes.transaction_template_helper: + skouat.ppde.helpers.compare: + class: skouat\ppde\helpers\compare_helper + + skouat.ppde.helpers.transaction_template_helper: class: skouat\ppde\includes\transaction_template_helper arguments: - '@template' @@ -10,8 +13,8 @@ services: - '%core.root_path%' - '%core.php_ext%' - skouat.ppde.includes.transaction_validator: - class: skouat\ppde\includes\transaction_validator + skouat.ppde.includes.transaction_validator_helper: + class: skouat\ppde\includes\transaction_validator_helper arguments: - '@language' - '@request' diff --git a/config/operators.yml b/config/operators.yml index 88c7814..e7bfaea 100644 --- a/config/operators.yml +++ b/config/operators.yml @@ -1,7 +1,4 @@ services: - skouat.ppde.operator.compare: - class: skouat\ppde\operators\compare - skouat.ppde.operator.currency: class: skouat\ppde\operators\currency arguments: diff --git a/config/services.yml b/config/services.yml index c4cc303..a4ffe27 100644 --- a/config/services.yml +++ b/config/services.yml @@ -12,7 +12,7 @@ services: class: skouat\ppde\event\listener arguments: - '@config' - - '@controller.helper' + - '@controller.helpers' - '@language' - '@skouat.ppde.controller' - '@skouat.ppde.controller.main.displaystats' diff --git a/controller/admin/transactions_controller.php b/controller/admin/transactions_controller.php index 05f1f1d..a7b4c85 100644 --- a/controller/admin/transactions_controller.php +++ b/controller/admin/transactions_controller.php @@ -20,8 +20,8 @@ use skouat\ppde\actions\core; use skouat\ppde\actions\currency; use skouat\ppde\exception\transaction_exception; -use skouat\ppde\includes\transaction_template_helper; -use skouat\ppde\includes\transaction_validator; +use skouat\ppde\helpers\transaction_template_helper; +use skouat\ppde\helpers\transaction_validator_helper; use skouat\ppde\operators\transactions; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -86,7 +86,7 @@ public function __construct( template $template, user $user, transaction_template_helper $template_helper, - transaction_validator $transaction_validator, + transaction_validator_helper $transaction_validator, string $adm_relative_path, string $phpbb_root_path, string $php_ext diff --git a/controller/ipn_log.php b/controller/ipn_log.php index 622f357..09bbc85 100644 --- a/controller/ipn_log.php +++ b/controller/ipn_log.php @@ -52,7 +52,7 @@ class ipn_log * * @param config $config Config object * @param filesystem_interface $filesystem phpBB's filesystem service - * @param path_helper $path_helper Path helper object + * @param path_helper $path_helper Path helpers object * @param main_controller $ppde_controller_main Main controller */ public function __construct( diff --git a/controller/main_controller.php b/controller/main_controller.php index 152dda0..4a7869b 100644 --- a/controller/main_controller.php +++ b/controller/main_controller.php @@ -39,7 +39,7 @@ class main_controller * * @param config $config Config object * @param ContainerInterface $container Service container interface - * @param helper $helper Controller helper object + * @param helper $helper Controller helpers object * @param language $language Language user object * @param \skouat\ppde\actions\auth $actions_auth PPDE auth actions object * @param \skouat\ppde\actions\currency $actions_currency PPDE currency actions object diff --git a/entity/donation_pages.php b/entity/donation_pages.php index 7c8da09..1065f3e 100644 --- a/entity/donation_pages.php +++ b/entity/donation_pages.php @@ -145,7 +145,7 @@ public function message_enable_bbcode() } /** - * Set option helper + * Set option helpers * * @param int $option_value Value of the option * @param bool $negate Negate (unset) option (Default: False) diff --git a/event/listener.php b/event/listener.php index fab2a88..4b3f400 100644 --- a/event/listener.php +++ b/event/listener.php @@ -35,7 +35,7 @@ class listener implements EventSubscriberInterface * Constructor * * @param config $config Config object - * @param helper $controller_helper Controller helper object + * @param helper $controller_helper Controller helpers object * @param language $language Language user object * @param main_controller $ppde_controller_main PPDE main controller object * @param main_display_stats $ppde_controller_display_stats Display stats controller object diff --git a/operators/compare.php b/helpers/compare_helper.php similarity index 94% rename from operators/compare.php rename to helpers/compare_helper.php index f269774..bfdf06c 100644 --- a/operators/compare.php +++ b/helpers/compare_helper.php @@ -3,14 +3,14 @@ * * PayPal Donation extension for the phpBB Forum Software package. * - * @copyright (c) 2015-2020 Skouat + * @copyright (c) 2015-2024 Skouat * @license GNU General Public License, version 2 (GPL-2.0) * */ -namespace skouat\ppde\operators; +namespace skouat\ppde\helpers; -class compare +class compare_helper { /** @var array */ private static $operators_table = [ diff --git a/includes/transaction_template_helper.php b/helpers/transaction_template_helper.php similarity index 99% rename from includes/transaction_template_helper.php rename to helpers/transaction_template_helper.php index d0b0149..9758b4e 100644 --- a/includes/transaction_template_helper.php +++ b/helpers/transaction_template_helper.php @@ -8,7 +8,7 @@ * */ -namespace skouat\ppde\includes; +namespace skouat\ppde\helpers; use phpbb\template\template; use phpbb\language\language; diff --git a/includes/transaction_validator.php b/helpers/transaction_validator_helper.php similarity index 98% rename from includes/transaction_validator.php rename to helpers/transaction_validator_helper.php index 2446f36..6d6fbbc 100644 --- a/includes/transaction_validator.php +++ b/helpers/transaction_validator_helper.php @@ -8,7 +8,7 @@ * */ -namespace skouat\ppde\includes; +namespace skouat\ppde\helpers; use phpbb\language\language; use phpbb\request\request; @@ -16,7 +16,7 @@ use phpbb\user_loader; use skouat\ppde\exception\transaction_exception; -class transaction_validator +class transaction_validator_helper { /** @var language */ protected $language;