From 91566efbd837e2356ffcc55fee888b336f15e524 Mon Sep 17 00:00:00 2001 From: Gemorroj Date: Thu, 4 Jan 2024 15:36:51 +0300 Subject: [PATCH] feature: [BC] use strict_types --- README.md | 4 ++++ src/Exception.php | 2 ++ src/M3uData.php | 2 ++ src/M3uEntry.php | 2 ++ src/M3uParser.php | 2 ++ src/Tag/ExtAlbumArtUrl.php | 2 ++ src/Tag/ExtGrp.php | 2 ++ src/Tag/ExtInf.php | 6 ++++-- src/Tag/ExtLogo.php | 2 ++ src/Tag/ExtTagInterface.php | 2 ++ src/Tag/ExtTitle.php | 2 ++ src/Tag/ExtTv.php | 2 ++ src/Tag/ExtVlcOpt.php | 2 ++ src/Tag/Playlist.php | 2 ++ src/TagAttributesTrait.php | 2 ++ src/TagsManagerTrait.php | 2 ++ tests/ExceptionTest.php | 2 ++ tests/ExtCustomTag.php | 2 ++ tests/M3uDataTest.php | 2 ++ tests/M3uParserTest.php | 2 ++ tests/Tag/ExtAlbumArtUrlTest.php | 2 ++ tests/Tag/ExtGrpTest.php | 2 ++ tests/Tag/ExtInfTest.php | 2 ++ tests/Tag/ExtLogoTest.php | 2 ++ tests/Tag/ExtTitleTest.php | 2 ++ tests/Tag/ExtTvTest.php | 2 ++ tests/Tag/ExtVlcOptTest.php | 2 ++ tests/Tag/PlaylistTest.php | 2 ++ tests/TagAttributesTraitTest.php | 2 ++ tests/TagsManagerTraitTest.php | 2 ++ 30 files changed, 64 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ffb61ef..6707565 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ composer require gemorroj/m3u-parser ```php */ diff --git a/src/M3uEntry.php b/src/M3uEntry.php index f87c105..4d4e6fb 100644 --- a/src/M3uEntry.php +++ b/src/M3uEntry.php @@ -1,5 +1,7 @@ title; } - public function setDuration(float $duration): self + public function setDuration(float|int $duration): self { - $this->duration = $duration; + $this->duration = (float) $duration; return $this; } diff --git a/src/Tag/ExtLogo.php b/src/Tag/ExtLogo.php index 3698c9d..e6da3d6 100644 --- a/src/Tag/ExtLogo.php +++ b/src/Tag/ExtLogo.php @@ -1,5 +1,7 @@