alaouy / YouTube

🔥 Laravel PHP Facade/Wrapper for the Youtube Data API
MIT License
780 stars 205 forks source link

function `decodeList` pretends to return array but can also return `false` #178

Open toolslive opened 2 years ago

toolslive commented 2 years ago

The phpdoc states:

 /**
     * Decode the response from youtube, extract the list of resource objects
     *
     * @param  string $apiData response string from youtube
     * @throws \Exception
     * @return array Array of StdClass objects
     */
    public function decodeList(&$apiData)

However: https://github.com/alaouy/Youtube/blob/7bff541457a4ffe7c96cc693d55a47c7682dc944/src/Youtube.php#L717

alaouy commented 2 years ago

@toolslive PRs with tests are always welcome. Thank you 🙏