HubSpot / hubspot-api-php

HubSpot API PHP Client Libraries for V3 version of the API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Something I don't understand

pdeberranger opened this issue · comments

Hi team,
I've find this in codegen/Crm/Contacts/Api/BasicApi.php:429 :

if ('\HubSpot\Client\Crm\Contacts\Model\SimplePublicObject' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\HubSpot\Client\Crm\Contacts\Model\SimplePublicObject' !== 'string') {
$content = json_decode($content);
}
}

I don't know if the if () are ok, for me not because it's always false and true!

commented

Hi @pdeberranger .
The SDK is auto-generated based on swagger files and these if-constructions are caused by using of OpenApiGenerator.
They works good.