Fixing style errors.

This commit is contained in:
stickler-ci 2022-11-25 23:57:35 +00:00
parent 616e2b79ef
commit 3fd81293a3
6 changed files with 10 additions and 13 deletions

View File

@ -384,9 +384,9 @@ class Members extends DolibarrApi
$res = $member->delete($member->id, DolibarrApiAccess::$user); $res = $member->delete($member->id, DolibarrApiAccess::$user);
if($res < 0) { if ($res < 0) {
throw new RestException(500, "Can't delete, error occurs"); 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"); throw new RestException(409, "Can't delete, that product is probably used");
} }

View File

@ -229,9 +229,9 @@ class MembersTypes extends DolibarrApi
} }
$res = $membertype->delete(); $res = $membertype->delete();
if($res < 0) { if ($res < 0) {
throw new RestException(500, "Can't delete, error occurs"); 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"); throw new RestException(409, "Can't delete, that product is probably used");
} }

View File

@ -215,9 +215,9 @@ class Subscriptions extends DolibarrApi
} }
$res = $subscription->delete(DolibarrApiAccess::$user); $res = $subscription->delete(DolibarrApiAccess::$user);
if($res < 0) { if ($res < 0) {
throw new RestException(500, "Can't delete, error occurs"); 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"); throw new RestException(409, "Can't delete, that product is probably used");
} }

View File

@ -436,9 +436,9 @@ class Products extends DolibarrApi
$user = DolibarrApiAccess::$user; $user = DolibarrApiAccess::$user;
$res = $this->product->delete(DolibarrApiAccess::$user); $res = $this->product->delete(DolibarrApiAccess::$user);
if($res < 0) { if ($res < 0) {
throw new RestException(500, "Can't delete, error occurs"); 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"); throw new RestException(409, "Can't delete, that product is probably used");
} }

View File

@ -527,9 +527,9 @@ class Thirdparties extends DolibarrApi
$this->company->oldcopy = clone $this->company; $this->company->oldcopy = clone $this->company;
$res = $this->company->delete($id); $res = $this->company->delete($id);
if($res < 0) { if ($res < 0) {
throw new RestException(500, "Can't delete, error occurs"); 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"); throw new RestException(409, "Can't delete, that product is probably used");
} }
@ -539,8 +539,6 @@ class Thirdparties extends DolibarrApi
'message' => 'Object deleted' 'message' => 'Object deleted'
) )
); );
} }
/** /**

View File

@ -639,7 +639,6 @@ class Users extends DolibarrApi
'message' => 'Ticket deleted' 'message' => 'Ticket deleted'
) )
); );
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore