Fixing style errors.
This commit is contained in:
parent
616e2b79ef
commit
3fd81293a3
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user