From 38a962cbdc8ddf40a0d2cbed4c89838893ecf239 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Mon, 27 May 2024 20:54:44 +0100 Subject: [PATCH] Style changes --- src/Mp3Info.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Mp3Info.php b/src/Mp3Info.php index c6b26ca..e6adf38 100644 --- a/src/Mp3Info.php +++ b/src/Mp3Info.php @@ -297,8 +297,11 @@ class Mp3Info $this->fileObj->seekTo($this->fileObj->getFileSize() - 128); if ($this->fileObj->getBytes(3) == self::TAG1_SYNC) { - if ($mode & self::TAGS) $audioSize -= $this->readId3v1Body(); - else $audioSize -= 128; + if ($mode & self::TAGS) { + $audioSize -= $this->readId3v1Body(); + } else { + $audioSize -= 128; + } } if ($mode & self::TAGS) { @@ -433,7 +436,7 @@ class Mp3Info $this->fileObj->seekTo($pos + $this->_cbrFrameSize); - return isset($this->vbrProperties['frames']) ? $this->vbrProperties['frames'] : null; + return $this->vbrProperties['frames'] ?? null; } /** @@ -965,7 +968,7 @@ class Mp3Info * * @return string */ - private function _getUtf8Text(int $encoding, string|null $rawText): string + private function _getUtf8Text(int $encoding, ?string $rawText): string { if (is_null($rawText)) { $rawText = ''; @@ -1070,7 +1073,7 @@ class Mp3Info // id3v2 tag return true; } - if (self::FRAME_SYNC === (unpack('n*', $raw)[1] & self::FRAME_SYNC)) { + if (unpack('n', $raw)[1] & self::FRAME_SYNC === self::FRAME_SYNC) { // mpeg header tag return true; }