I think the id type on Retreive file should be string, because the xendit id pattern is like 579c8d61f23fa4ca35e52da4 (I got sample id from this link)
We got error on psalm check like this:
ERROR: InvalidScalarArgument - XenditInvoiceService.php:88:42 - Argument 1 of Xendit\Invoice::retrieve expects int|null, string provided (see https://psalm.dev/012)
return \Xendit\Invoice::retrieve($xenditId);
and, this is the code that has to be changed:
trait Retrieve
{
/**
* Send GET request to retrieve data
*
* @param int|null $id ID // << i think this is should be string|null
*
* @return array
*/
public static function retrieve($id)
Hello.
I think the id type on
Retreive
file should be string, because the xendit id pattern is like579c8d61f23fa4ca35e52da4
(I got sample id from this link)We got error on psalm check like this:
and, this is the code that has to be changed: