public function hydrateList(?array $data, string $modelName): Collection
    {
        $collectionKey = $this->sdk->getMapping()->getConfig()['collectionKey'];

        if (is_array($data) && ArrayHelper::arrayHas($data, $collectionKey)) {
            return $this->deserializeAll($data, $modelName);
        }

        return new Collection();
    }
public function hydrateList(?array $data, string $modelName): Collection
    {
        $collectionKey = $this->sdk->getMapping()->getConfig()['collectionKey'];

        if (is_array($data) && ArrayHelper::arrayHas($data, $collectionKey)) {
            return $this->deserializeAll($data, $modelName);
        }

        return new Collection();
    }
public function hydrateList ( ? array $ data , string $ modelName ) : Collection { $ collectionKey = $ this -> sdk -> getMapping ( ) -> getConfig ( ) [ 'collectionKey' ] ; if ( is_array ( $ data ) && ArrayHelper :: arrayHas ( $ data , $ collectionKey ) ) { return $ this -> deserializeAll ( $ data , $ modelName ) ; } return new Collection ( ) ; }
convert API response to Collection containing entities
convert API response to Collection containing entities