1 | <?php |
||
11 | class Jetpack_Podcast_Helper { |
||
12 | /** |
||
13 | * Gets a list of tracks for the supplied RSS feed. This function is used |
||
14 | * in both server-side block rendering and in API `WPCOM_REST_API_V2_Endpoint_Podcast_Player`. |
||
15 | * |
||
16 | * @param string $feed The RSS feed to load and list tracks for. |
||
17 | * @param int $quantity Optional. The number of tracks to return. |
||
18 | * @return array|WP_Error The feed's tracks or a error object. |
||
19 | */ |
||
20 | public static function get_track_list( $feed, $quantity = 10 ) { |
||
36 | |||
37 | /** |
||
38 | * Prepares Episode data to be used with MediaElement.js. |
||
39 | * |
||
40 | * @param SimplePie_Item $episode SimplePie_Item object, representing a podcast episode. |
||
41 | * @return array |
||
42 | */ |
||
43 | private static function setup_tracks_callback( SimplePie_Item $episode ) { |
||
71 | |||
72 | /** |
||
73 | * Retrieves an audio enclosure. |
||
74 | * |
||
75 | * @param SimplePie_Item $episode SimplePie_Item object, representing a podcast episode. |
||
76 | * @return SimplePie_Enclosure|null |
||
77 | */ |
||
78 | private static function get_audio_enclosure( SimplePie_Item $episode ) { |
||
88 | |||
89 | /** |
||
90 | * Returns the track duration as a formatted string. |
||
91 | * |
||
92 | * @param number $duration of the track in seconds. |
||
93 | * @return string |
||
94 | */ |
||
95 | private static function format_track_duration( $duration ) { |
||
100 | } |
||
101 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.