-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
phpstan complains on
$request = new FindProductsRequestType();
$request->ProductID = new ProductIDType();
$request->ProductID->type = 'EAN'; // <<< [phpstan] Property DTS\eBaySDK\Shopping\Types\ProductIDType::$type (DTS\eBaySDK\Shopping\Enums\ProductIDCodeType) does not accept string.
$request->ProductID->value = $ean;namespace DTS\eBaySDK\Shopping\Types;
/**
*
* @property \DTS\eBaySDK\Shopping\Enums\ProductIDCodeType $type
*/
class ProductIDType extends \DTS\eBaySDK\Types\StringType
{
...(The code is working, but I'm not sure on the good way to write it)
EDIT:
works good too without warning from phpstan
$request = new FindProductsRequestType();
$request->ProductID = new ProductIDType(['value' => $ean, 'type' => 'EAN']);Metadata
Metadata
Assignees
Labels
No labels