Oryzone / PHPoAuthUserData

Extension library for Lusitanian/PHPoAuthLib to extract user profile data from various oAuth providers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Too complicated code?

cmfcmf opened this issue · comments

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

@cmfcmf,
Honestly I didn't know about the option. Thanks for suggesting it!