Skip to content

Commit

Permalink
fix: remove space after EXTLOGO and EXTTV
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemorroj committed Jul 28, 2021
1 parent 9f31b94 commit b359006
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Tag/ExtLogo.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct(?string $lineStr = null)

public function __toString(): string
{
return '#EXTLOGO: '.$this->getLogo();
return '#EXTLOGO:'.$this->getLogo();
}

public function getLogo(): string
Expand Down
2 changes: 1 addition & 1 deletion src/Tag/ExtTv.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(?string $lineStr = null)

public function __toString(): string
{
return '#EXTTV: '.\implode(',', $this->getTags()).';'.$this->getLanguage().';'.$this->getXmlTvId().($this->getIconUrl() ? ';'.$this->getIconUrl() : '');
return '#EXTTV:'.\implode(',', $this->getTags()).';'.$this->getLanguage().';'.$this->getXmlTvId().($this->getIconUrl() ? ';'.$this->getIconUrl() : '');
}

/**
Expand Down
12 changes: 6 additions & 6 deletions tests/M3uDataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public function testComplexDefaultEntryToString(): void
{
$expectedString = '#EXTM3U test-name="test-value"'."\n";
$expectedString .= '#EXTINF:123 test-attr="test-attrname", extinf-title'."\n";
$expectedString .= '#EXTTV: hd,sd;ru;xml-tv-id;https://example.org/icon.png'."\n";
$expectedString .= '#EXTLOGO: https://example.org/logo.png'."\n";
$expectedString .= '#EXTTV:hd,sd;ru;xml-tv-id;https://example.org/icon.png'."\n";
$expectedString .= '#EXTLOGO:https://example.org/logo.png'."\n";
$expectedString .= 'test-path';

$entry = new M3uEntry();
Expand Down Expand Up @@ -53,12 +53,12 @@ public function testComplexDefaultEntriesToString(): void
{
$expectedString = '#EXTM3U test-name="test-value"'."\n";
$expectedString .= '#EXTINF:123 test-attr="test-attrname1", extinf-title1'."\n";
$expectedString .= '#EXTTV: hd,sd;ru;xml-tv-id;https://example.org/icon.png'."\n";
$expectedString .= '#EXTLOGO: https://example.org/logo.png'."\n";
$expectedString .= '#EXTTV:hd,sd;ru;xml-tv-id;https://example.org/icon.png'."\n";
$expectedString .= '#EXTLOGO:https://example.org/logo.png'."\n";
$expectedString .= 'test-path1'."\n";
$expectedString .= '#EXTINF:123 test-attr="test-attrname2", extinf-title2'."\n";
$expectedString .= '#EXTTV: hd,sd;ru;xml-tv-id;https://example.org/icon.png'."\n";
$expectedString .= '#EXTLOGO: https://example.org/logo.png'."\n";
$expectedString .= '#EXTTV:hd,sd;ru;xml-tv-id;https://example.org/icon.png'."\n";
$expectedString .= '#EXTLOGO:https://example.org/logo.png'."\n";
$expectedString .= 'test-path2';

$entry1 = new M3uEntry();
Expand Down
2 changes: 1 addition & 1 deletion tests/Tag/ExtLogoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function testParseExtLogo(): void
public function testGenerateExtLogo(): void
{
$expectedString = '#EXTM3U'."\n";
$expectedString .= '#EXTLOGO: http://example.org/logo.png'."\n";
$expectedString .= '#EXTLOGO:http://example.org/logo.png'."\n";
$expectedString .= 'test-path';

$entry = new M3uEntry();
Expand Down
2 changes: 1 addition & 1 deletion tests/Tag/ExtTvTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function testParseExtTv(): void
public function testGenerateExtTv(): void
{
$expectedString = '#EXTM3U'."\n";
$expectedString .= '#EXTTV: hd,sd;ru;xml-tv-id;https://example.org/icon.png'."\n";
$expectedString .= '#EXTTV:hd,sd;ru;xml-tv-id;https://example.org/icon.png'."\n";
$expectedString .= 'test-path';

$entry = new M3uEntry();
Expand Down

0 comments on commit b359006

Please sign in to comment.