From 3fd81293a389cb8e0ad2fa3a98ac624da8b43424 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 25 Nov 2022 23:57:35 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/adherents/class/api_members.class.php | 4 ++-- htdocs/adherents/class/api_memberstypes.class.php | 4 ++-- htdocs/adherents/class/api_subscriptions.class.php | 4 ++-- htdocs/product/class/api_products.class.php | 4 ++-- htdocs/societe/class/api_thirdparties.class.php | 6 ++---- htdocs/user/class/api_users.class.php | 1 - 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index f5efbd8582e..9038ada74d3 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -384,9 +384,9 @@ class Members extends DolibarrApi $res = $member->delete($member->id, DolibarrApiAccess::$user); - if($res < 0) { + if ($res < 0) { throw new RestException(500, "Can't delete, error occurs"); - }elseif($res == 0) { + } elseif ($res == 0) { throw new RestException(409, "Can't delete, that product is probably used"); } diff --git a/htdocs/adherents/class/api_memberstypes.class.php b/htdocs/adherents/class/api_memberstypes.class.php index a4ce0ddf1f4..eb561ff6c60 100644 --- a/htdocs/adherents/class/api_memberstypes.class.php +++ b/htdocs/adherents/class/api_memberstypes.class.php @@ -229,9 +229,9 @@ class MembersTypes extends DolibarrApi } $res = $membertype->delete(); - if($res < 0) { + if ($res < 0) { throw new RestException(500, "Can't delete, error occurs"); - }elseif($res == 0) { + } elseif ($res == 0) { throw new RestException(409, "Can't delete, that product is probably used"); } diff --git a/htdocs/adherents/class/api_subscriptions.class.php b/htdocs/adherents/class/api_subscriptions.class.php index 1cada6c7f3e..b3871cb08d6 100644 --- a/htdocs/adherents/class/api_subscriptions.class.php +++ b/htdocs/adherents/class/api_subscriptions.class.php @@ -215,9 +215,9 @@ class Subscriptions extends DolibarrApi } $res = $subscription->delete(DolibarrApiAccess::$user); - if($res < 0) { + if ($res < 0) { throw new RestException(500, "Can't delete, error occurs"); - }elseif($res == 0) { + } elseif ($res == 0) { throw new RestException(409, "Can't delete, that product is probably used"); } diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index b3dd2c019df..445387fb2b5 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -436,9 +436,9 @@ class Products extends DolibarrApi $user = DolibarrApiAccess::$user; $res = $this->product->delete(DolibarrApiAccess::$user); - if($res < 0) { + if ($res < 0) { throw new RestException(500, "Can't delete, error occurs"); - }elseif($res == 0) { + } elseif ($res == 0) { throw new RestException(409, "Can't delete, that product is probably used"); } diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 4646175878c..27da78e9456 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -527,9 +527,9 @@ class Thirdparties extends DolibarrApi $this->company->oldcopy = clone $this->company; $res = $this->company->delete($id); - if($res < 0) { + if ($res < 0) { throw new RestException(500, "Can't delete, error occurs"); - }elseif($res == 0) { + } elseif ($res == 0) { throw new RestException(409, "Can't delete, that product is probably used"); } @@ -539,8 +539,6 @@ class Thirdparties extends DolibarrApi 'message' => 'Object deleted' ) ); - - } /** diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index 83cd88f8ade..0acfe30d279 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -639,7 +639,6 @@ class Users extends DolibarrApi 'message' => 'Ticket deleted' ) ); - } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore