From 6e8f73630247046e3435c893f77a9c8ca84aee3b Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 7 Feb 2023 13:59:20 +0100 Subject: [PATCH] SonarQube code smells resolve #13 --- Source/API/script/APIController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/API/script/APIController.php b/Source/API/script/APIController.php index f563b18..19e2190 100644 --- a/Source/API/script/APIController.php +++ b/Source/API/script/APIController.php @@ -2,18 +2,17 @@ class APIController { - // private ScriptDatabase $script; public function __construct() { try { if (empty($_REQUEST['action'])) { - $action = NULL; + $action = null; } else { $action = $_REQUEST['action']; } $listGateway = array("\\Gateway\\GatewayForm", "\\Gateway\\GatewayKeyword", "\\Gateway\\GatewayQuestion"); foreach ($listGateway as $gateway) { - if(method_exists($gateway, $action)) { + if (method_exists($gateway, $action)) { (new $gateway)->$action(); } }