Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Returntype invalid #68

Open
Open
@padhie

Description

Namespace: \Madcoda\Youtube\Youtube
Method: getVideosInfo()

The Docblock of Method getVideosInfo say, the return value is always \StdClass.
First the type call \stdClass (lowercase s) and secondary in the method will be the method \Madcoda\Youtube\Youtube::decodeList called. There it can be return \stdClass OR array.

Docblock getVideoInfo()

 /**
 * @param $vIds
 * @return \StdClass
 * @throws \Exception
 */

Docblock decodeList()

 /**
 * 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
 */

The correct Docblock sould be looks like this:
Docblock getVideoInfo()

 /**
 * @param array|string $vIds
 * @return \stdClass|array
 * @throws \Exception
 */

Docblock decodeList()

 /**
 * Decode the response from youtube, extract the list of resource objects
 *
 * @param string $apiData response string from youtube
 * @throws \Exception
 * @return \stdClass|array Array of StdClass objects
 */

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /