Updated Lint Issies

This commit is contained in:
Mr Matthew Sidnell 2020-08-19 16:27:00 +01:00 committed by GitHub
parent b3f078a687
commit c2a81341ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,8 +245,7 @@ class Categories extends DolibarrApi
if ($this->category->update(DolibarrApiAccess::$user) > 0)
{
return $this->get($id);
}
else
} else
{
throw new RestException(500, $this->category->error);
}
@ -324,7 +323,7 @@ class Categories extends DolibarrApi
throw new RestException(401);
} elseif ($type == Categorie::TYPE_MEMBER && !DolibarrApiAccess::$user->rights->adherent->lire) {
throw new RestException(401);
} elseif ($type == Categorie::TYPE_PROJECT && !DolibarrApiAccess::$user->rights->projet->lire) {
} elseif ($type == Categorie::TYPE_PROJECT && !DolibarrApiAccess::$user->rights->projet->lire) {
throw new RestException(401);
}
@ -781,10 +780,10 @@ class Categories extends DolibarrApi
} elseif ($type == 'contact') {
$objects_api = new Contacts();
}
elseif ($type == 'project') {
elseif ($type == 'project') {
$objects_api = new Projects();
}
if (is_object($objects_api))
if (is_object($objects_api))
{
foreach ($objects as $obj) {
$cleaned_objects[] = $objects_api->_cleanObjectDatas($obj);