From b2d18a8e0c011f5011c42450eb4cacdd3fb4335b Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 14 Nov 2019 20:56:31 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/categories/class/api_categories.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/categories/class/api_categories.class.php b/htdocs/categories/class/api_categories.class.php index 5b8f0cdbe39..92ce17642ab 100644 --- a/htdocs/categories/class/api_categories.class.php +++ b/htdocs/categories/class/api_categories.class.php @@ -264,7 +264,7 @@ class Categories extends DolibarrApi ) ); } - + /** * List categories of an object * @@ -278,7 +278,7 @@ class Categories extends DolibarrApi * @return array Array of category objects * * @throws RestException - * + * * @url GET /object/{type}/{id} */ public function getListForObject($id, $type = 'customer', $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) @@ -287,13 +287,13 @@ class Categories extends DolibarrApi if (!in_array($type, ['product'/*, 'member', 'customer', 'supplier', 'contact'*/])) { throw new RestException(401); } - + if($type == 'product' && ! (DolibarrApiAccess::$user->rights->produit->lire || DolibarrApiAccess::$user->rights->service->lire)) { throw new RestException(401); } - + $categories = $this->category->getListForItem($id, $type, $sortfield, $sortorder, $limit, $page); - + if( ! count($categories)) { throw new RestException(404, 'No category found for this object'); }