From 761ced223717d798526289b1dfba14b83ee7e34b Mon Sep 17 00:00:00 2001 From: Alexis Date: Tue, 7 Feb 2023 14:02:39 +0100 Subject: [PATCH] SonarQube code smells resolve #15 --- Source/API/script/Config/config.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/API/script/Config/config.php b/Source/API/script/Config/config.php index 0f89eb1..1bf7188 100644 --- a/Source/API/script/Config/config.php +++ b/Source/API/script/Config/config.php @@ -8,12 +8,12 @@ function connect() $login = "root"; try { - - $connection = new Connection($dsn,$login,"root"); - - } catch (PDOException $e){ + $connection = new Connection($dsn ,$login,"root"); + } catch (PDOException $e) { http_response_code(404); + return http_response_code(); } + return $connection; }