Style changes

This commit is contained in:
Markus Birth 2024-05-27 20:54:44 +01:00
parent 3ff00fde72
commit 38a962cbdc

View File

@ -297,8 +297,11 @@ class Mp3Info
$this->fileObj->seekTo($this->fileObj->getFileSize() - 128); $this->fileObj->seekTo($this->fileObj->getFileSize() - 128);
if ($this->fileObj->getBytes(3) == self::TAG1_SYNC) { if ($this->fileObj->getBytes(3) == self::TAG1_SYNC) {
if ($mode & self::TAGS) $audioSize -= $this->readId3v1Body(); if ($mode & self::TAGS) {
else $audioSize -= 128; $audioSize -= $this->readId3v1Body();
} else {
$audioSize -= 128;
}
} }
if ($mode & self::TAGS) { if ($mode & self::TAGS) {
@ -433,7 +436,7 @@ class Mp3Info
$this->fileObj->seekTo($pos + $this->_cbrFrameSize); $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 * @return string
*/ */
private function _getUtf8Text(int $encoding, string|null $rawText): string private function _getUtf8Text(int $encoding, ?string $rawText): string
{ {
if (is_null($rawText)) { if (is_null($rawText)) {
$rawText = ''; $rawText = '';
@ -1070,7 +1073,7 @@ class Mp3Info
// id3v2 tag // id3v2 tag
return true; 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 // mpeg header tag
return true; return true;
} }