Skip to content

Commit

Permalink
build: min php version is 8.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemorroj committed Jul 3, 2023
1 parent 885a076 commit 0f75e38
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 22 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ jobs:
fail-fast: false
matrix:
include:
- operating-system: 'ubuntu-latest'
php-version: '7.4'
job-description: 'Ubuntu; PHP 7.4; latest-deps'

- operating-system: 'ubuntu-latest'
php-version: '7.4'
composer-flags: '--prefer-lowest'
job-description: 'Ubuntu; PHP 7.4; lowest-deps'

- operating-system: 'ubuntu-latest'
php-version: '8.0'
job-description: 'Ubuntu; PHP 8.0; latest-deps'
Expand Down
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'@PHP74Migration' => true,
'@PHP80Migration' => true,

'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

### Requirements:

- PHP >= 7.4
- PHP >= 8.0.2


### Installation:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
}
],
"require": {
"php": ">=7.4"
"php": ">=8.0.2"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^9.6",
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/phpstan": "^1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/M3uParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ protected function parseLine(int &$lineNumber, array $linesStr): M3uEntry

protected function removeBom(string &$str): void
{
if (0 === \strpos($str, "\xEF\xBB\xBF")) {
if (\str_starts_with($str, "\xEF\xBB\xBF")) {
$str = \substr($str, 3);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Tag/ExtInf.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ExtInf implements ExtTagInterface
/**
* #EXTINF:-1 tvg-name=Первый_HD tvg-logo="Первый канал" deinterlace=4 group-title="Эфирные каналы",Первый канал HD.
*/
public function __construct(?string $lineStr = null)
public function __construct(string $lineStr = null)
{
if (null !== $lineStr) {
$this->make($lineStr);
Expand Down
2 changes: 1 addition & 1 deletion src/Tag/ExtLogo.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ExtLogo implements ExtTagInterface
/**
* #EXTLOGO:http://cdn1.siol.tv/logo/93x78/slo2.png.
*/
public function __construct(?string $lineStr = null)
public function __construct(string $lineStr = null)
{
if (null !== $lineStr) {
$this->makeData($lineStr);
Expand Down
6 changes: 2 additions & 4 deletions src/Tag/ExtTagInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

namespace M3uParser\Tag;

interface ExtTagInterface
interface ExtTagInterface extends \Stringable
{
public function __construct(?string $lineStr = null);

public function __toString(): string;
public function __construct(string $lineStr = null);

public static function isMatch(string $lineStr): bool;
}
2 changes: 1 addition & 1 deletion src/Tag/ExtTv.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ExtTv implements ExtTagInterface
/**
* #EXTTV:nacionalni,hd;slovenski;SLO1;http://cdn1.siol.tv/logo/93x78/slo2.png.
*/
public function __construct(?string $lineStr = null)
public function __construct(string $lineStr = null)
{
if (null !== $lineStr) {
$this->makeData($lineStr);
Expand Down
2 changes: 1 addition & 1 deletion tests/ExtCustomTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ExtCustomTag implements ExtTagInterface
/**
* #EXTCUSTOMTAG:data.
*/
public function __construct(?string $lineStr = null)
public function __construct(string $lineStr = null)
{
if (null !== $lineStr) {
$this->makeData($lineStr);
Expand Down

0 comments on commit 0f75e38

Please sign in to comment.