From f0fc9a7ae29b14bddd5e9f14cc30b9b0674e8425 Mon Sep 17 00:00:00 2001 From: boyska Date: Thu, 7 Mar 2024 12:41:52 +0100 Subject: [PATCH] [M3uFormat] small refactoring --- formats/M3uFormat.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/formats/M3uFormat.php b/formats/M3uFormat.php index a8328cb7..f2218350 100644 --- a/formats/M3uFormat.php +++ b/formats/M3uFormat.php @@ -54,9 +54,14 @@ class M3uItem public $url = null; public $bytes = null; + public function isEmpty(): bool + { + return $this->url === null; + } + public function render(): string { - if ($this->url === null) { + if ($this->isEmpty()) { return ''; } $text = "\n";