Too complicated code?
cmfcmf opened this issue · comments
Christian Flach commented
Is there any reason why you don't use json_decode
with the second parameter set to true to receive an array?
protected function profileLoader()
{
return ArrayUtils::objectToArray(json_decode($this->service->request(self::REQUEST_PROFILE)));
}
https://github.com/Oryzone/PHPoAuthUserData/blob/master/src/OAuth/UserData/Extractor/Twitter.php#L58
Luciano Mammino commented
@cmfcmf,
Honestly I didn't know about the option. Thanks for suggesting it!