From d63e2e28cdbde3fe386695439886b920fce283be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 28 Dec 2022 05:12:03 +0100 Subject: [PATCH] Clean code --- htdocs/ticket/class/api_tickets.class.php | 6 +----- qodana.yaml | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/ticket/class/api_tickets.class.php b/htdocs/ticket/class/api_tickets.class.php index e7930569bdd..c2c34438177 100644 --- a/htdocs/ticket/class/api_tickets.class.php +++ b/htdocs/ticket/class/api_tickets.class.php @@ -112,11 +112,7 @@ class Tickets extends DolibarrApi */ public function getByRef($ref) { - try { - return $this->getCommon(0, '', $ref); - } catch (Exception $e) { - throw $e; - } + return $this->getCommon(0, '', $ref); } /** diff --git a/qodana.yaml b/qodana.yaml index 2d7a46ec76e..8630db28608 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -27,9 +27,11 @@ exclude: - name: PhpUnusedLocalVariableInspection - name: PhpTernaryExpressionCanBeReplacedWithConditionInspection - name: PhpSwitchStatementWitSingleBranchInspection + - name: PhpLoopCanBeReplacedWithImplodeInspection - name: PhpArrayAccessCanBeReplacedWithForeachValueInspection - name: PhpArrayPushWithOneElementInspection - name: PhpCastIsUnnecessaryInspection - name: PhpDeprecationInspection + - name: PhpStatementHasEmptyBodyInspection - name: PhpConditionAlreadyCheckedInspection \ No newline at end of file