-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
While I don't expect the amount of detail I added in the example below I would expect type hints for single type returns and parameters.
For example changing
public function getProductStock($idproduct) {
return $this->sendRequest('/products/' . $idproduct . '/stock');
}to
/**
* Requesting the stock for a product gives you the stock for the product per warehouse.
* @param string|int $idproduct
* @return array<string,(bool|string|array<int,array<string,int>>)>(3) {
"success"=>bool,
"rate-limit-remaining"=>string,
"data"=> array<int, array<string, int>> {
array<string, int>(7) {
"idwarehouse"=>int,
"stock"=>int,
"reserved"=>int,
"reservedbackorders"=>int,
"reservedpicklists"=>int,
"reservedallocations"=>int,
"freestock"=>int
}
}
}
* @see https://picqer.com/en/api/product-stock
*/
public function getProductStock($idproduct): array {
return $this->sendRequest('/products/' . $idproduct . '/stock');
}nickkraakman
Metadata
Metadata
Assignees
Labels
No labels