Fix phpcs

This commit is contained in:
Laurent Destailleur 2020-08-23 18:26:42 +02:00
parent 90e01888d4
commit 477c3e719d

View File

@ -242,11 +242,9 @@ class Categories extends DolibarrApi
$this->category->$field = $value; $this->category->$field = $value;
} }
if ($this->category->update(DolibarrApiAccess::$user) > 0) if ($this->category->update(DolibarrApiAccess::$user) > 0) {
{
return $this->get($id); return $this->get($id);
} else } else {
{
throw new RestException(500, $this->category->error); throw new RestException(500, $this->category->error);
} }
} }
@ -779,12 +777,10 @@ class Categories extends DolibarrApi
$objects_api = new Products(); $objects_api = new Products();
} elseif ($type == 'contact') { } elseif ($type == 'contact') {
$objects_api = new Contacts(); $objects_api = new Contacts();
} } elseif ($type == 'project') {
elseif ($type == 'project') {
$objects_api = new Projects(); $objects_api = new Projects();
} }
if (is_object($objects_api)) if (is_object($objects_api)) {
{
foreach ($objects as $obj) { foreach ($objects as $obj) {
$cleaned_objects[] = $objects_api->_cleanObjectDatas($obj); $cleaned_objects[] = $objects_api->_cleanObjectDatas($obj);
} }