2
0
forked from Wavyzz/dolibarr

Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
This commit is contained in:
Scrutinizer Auto-Fixer
2020-09-14 02:30:04 +00:00
parent 22edd650d3
commit 73915d51c8
20 changed files with 476 additions and 476 deletions

View File

@@ -475,16 +475,16 @@ class Orders extends DolibarrApi
*/
public function getContacts($id, $type = '')
{
if (! DolibarrApiAccess::$user->rights->commande->lire) {
if (!DolibarrApiAccess::$user->rights->commande->lire) {
throw new RestException(401);
}
$result = $this->commande->fetch($id);
if ( ! $result ) {
if (!$result) {
throw new RestException(404, 'Order not found');
}
if ( ! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) {
if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
@@ -556,16 +556,16 @@ class Orders extends DolibarrApi
*/
public function deleteContact($id, $rowid)
{
if (! DolibarrApiAccess::$user->rights->commande->creer) {
if (!DolibarrApiAccess::$user->rights->commande->creer) {
throw new RestException(401);
}
$result = $this->commande->fetch($id);
if (! $result) {
if (!$result) {
throw new RestException(404, 'Order not found');
}
if (! DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) {
if (!DolibarrApi::_checkAccessToResource('commande', $this->commande->id)) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}