SonarQube code smells resolve #13
continuous-integration/drone/push Build is passing Details

LoginModification
Alexis 2 years ago
parent 7711053798
commit 6e8f736302

@ -2,18 +2,17 @@
class APIController class APIController
{ {
// private ScriptDatabase $script;
public function __construct() public function __construct()
{ {
try { try {
if (empty($_REQUEST['action'])) { if (empty($_REQUEST['action'])) {
$action = NULL; $action = null;
} else { } else {
$action = $_REQUEST['action']; $action = $_REQUEST['action'];
} }
$listGateway = array("\\Gateway\\GatewayForm", "\\Gateway\\GatewayKeyword", "\\Gateway\\GatewayQuestion"); $listGateway = array("\\Gateway\\GatewayForm", "\\Gateway\\GatewayKeyword", "\\Gateway\\GatewayQuestion");
foreach ($listGateway as $gateway) { foreach ($listGateway as $gateway) {
if(method_exists($gateway, $action)) { if (method_exists($gateway, $action)) {
(new $gateway)->$action(); (new $gateway)->$action();
} }
} }

Loading…
Cancel
Save