Skip to content

Commit

Permalink
feature: implements \Stringable for M3uData and M3uEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemorroj committed Jan 3, 2024
1 parent b78b68f commit a46fef9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"require-dev": {
"phpunit/phpunit": "^9.6",
"friendsofphp/php-cs-fixer": "^3.41",
"friendsofphp/php-cs-fixer": "^3.45",
"phpstan/phpstan": "^1.10"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion src/M3uData.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace M3uParser;

/** @extends \ArrayIterator<int, M3uEntry> */
class M3uData extends \ArrayIterator
class M3uData extends \ArrayIterator implements \Stringable
{
use TagAttributesTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/M3uEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use M3uParser\Tag\ExtTagInterface;

class M3uEntry
class M3uEntry implements \Stringable
{
protected string $lineDelimiter = "\n";
/**
Expand Down
2 changes: 1 addition & 1 deletion src/M3uParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ protected function isComment(string $lineStr): bool
}
}

return !$matched && 0 === \strpos($lineStr, '#') && !$this->isExtM3u($lineStr);
return !$matched && \str_starts_with($lineStr, '#') && !$this->isExtM3u($lineStr);
}
}

0 comments on commit a46fef9

Please # to comment.