mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-08 16:08:54 +00:00
[M3uFormat] type hinting and comments
This commit is contained in:
parent
36f69af043
commit
e4a673aae5
@ -33,7 +33,11 @@ class M3uFormat extends FormatAbstract
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse_duration($duration_string)
|
/*
|
||||||
|
* parse_duration converts a string like "00:4:20" to 260
|
||||||
|
* allowing to convert duration as used in the itunes:duration tag to the number of seconds
|
||||||
|
*/
|
||||||
|
function parse_duration(string $duration_string): int
|
||||||
{
|
{
|
||||||
$seconds = 0;
|
$seconds = 0;
|
||||||
$parts = explode(':', $duration_string);
|
$parts = explode(':', $duration_string);
|
||||||
@ -50,7 +54,7 @@ class M3uItem
|
|||||||
public $url = null;
|
public $url = null;
|
||||||
public $bytes = null;
|
public $bytes = null;
|
||||||
|
|
||||||
public function render()
|
public function render(): string
|
||||||
{
|
{
|
||||||
if ($this->url === null) {
|
if ($this->url === null) {
|
||||||
return '';
|
return '';
|
||||||
|
Loading…
Reference in New Issue
Block a user