From 6edf5494c3aa70dd942c59c977f30c44daf5d783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean=20Traull=C3=A9?= Date: Thu, 15 Aug 2019 15:29:37 +0200 Subject: [PATCH] Added @throws annotations for possible exceptions --- htdocs/compta/bank/class/api_bankaccounts.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/bank/class/api_bankaccounts.class.php b/htdocs/compta/bank/class/api_bankaccounts.class.php index 8103d6b0b4f..ba21b6c09c1 100644 --- a/htdocs/compta/bank/class/api_bankaccounts.class.php +++ b/htdocs/compta/bank/class/api_bankaccounts.class.php @@ -184,7 +184,9 @@ class BankAccounts extends DolibarrApi * @status 201 * * @throws 401 Unauthorized: User does not have permission to configure bank accounts + * @throws 404 Not Found: Either the source or the destination bankaccount for the provided id does not exist * @throws 422 Unprocessable Entity: Refer to detailed exception message for the cause + * @throws 500 Internal Server Error: Error(s) returned by the RDBMS */ public function transfer($bankaccount_from_id = 0, $bankaccount_to_id = 0, $date = null, $description = "", $amount = 0.0, $amount_to = 0.0) { @@ -283,7 +285,7 @@ class BankAccounts extends DolibarrApi $error++; } - if (! $error) + if (!$error) { $this->db->commit();