If the API had required an array type for the setBasketItems method, as in setBasketItems(array $basketItems), my IDE would have alerted me, saving me several hours.
Given that PHP has supported type declarations for function parameters, including classes and arrays, since PHP 5.0 (2004, 20 years ago!), iyzico's API could have been better designed, avoiding unnecessary developer time wastage.
See also strict_types=1