Fixing style errors.

This commit is contained in:
stickler-ci 2021-03-06 18:48:55 +00:00
parent 1f55f50d19
commit 7ae57fb8d0

View File

@ -165,7 +165,7 @@ class Products extends DolibarrApi
* @param int $mode Use this param to filter list (0 for all, 1 for only product, 2 for only service) * @param int $mode Use this param to filter list (0 for all, 1 for only product, 2 for only service)
* @param int $category Use this param to filter list by category * @param int $category Use this param to filter list by category
* @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.tobuy:=:0) and (t.tosell:=:1)" * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.tobuy:=:0) and (t.tosell:=:1)"
* @param bool $ids_only Get a list of product ids * @param bool $ids_only Get a list of product ids
* @return array Array of product objects * @return array Array of product objects
*/ */
public function index($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $page = 0, $mode = 0, $category = 0, $sqlfilters = '', $ids_only = false) public function index($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $page = 0, $mode = 0, $category = 0, $sqlfilters = '', $ids_only = false)
@ -221,13 +221,13 @@ class Products extends DolibarrApi
while ($i < $min) { while ($i < $min) {
$obj = $this->db->fetch_object($result); $obj = $this->db->fetch_object($result);
if (!$ids_only) { if (!$ids_only) {
$product_static = new Product($this->db); $product_static = new Product($this->db);
if ($product_static->fetch($obj->rowid)) { if ($product_static->fetch($obj->rowid)) {
$obj_ret[] = $this->_cleanObjectDatas($product_static); $obj_ret[] = $this->_cleanObjectDatas($product_static);
} }
} else { } else {
$obj_ret[] = $obj; $obj_ret[] = $obj;
} }
$i++; $i++;
} }
} else { } else {