Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
php: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]

name: PHP ${{ matrix.php }} tests
steps:
Expand All @@ -33,7 +33,7 @@ jobs:
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 7.2
php-version: 7.4
coverage: none

- run: composer update --no-progress --prefer-lowest
Expand All @@ -47,7 +47,7 @@ jobs:
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 7.2
php-version: 7.4
coverage: none

- run: composer install
Expand All @@ -62,7 +62,7 @@ jobs:
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 7.3
php-version: 7.4
coverage: none

- run: composer install
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.2
coverage: none

- run: composer install
Expand All @@ -107,7 +107,7 @@ jobs:
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.3
coverage: none

- run: composer install
Expand All @@ -122,7 +122,7 @@ jobs:
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 8.2
php-version: 8.4
coverage: none

- run: composer install
Expand All @@ -136,7 +136,7 @@ jobs:
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.4
coverage: none

- run: composer install --no-progress
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": ">=7.2",
"php": ">=7.4",
"symfony/process": "~3.4|~4.0|~5.0|~6.0|~7.0",
"symfony/filesystem": "~3.4|~4.0|~5.0|~6.0|~7.0"
},
Expand Down
3 changes: 0 additions & 3 deletions src/Attribute/AttributeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@

interface AttributeInterface extends \JsonSerializable
{
/**
* @return string
*/
public function __toString(): string;
}
16 changes: 2 additions & 14 deletions src/Attribute/Cover.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,19 @@
class Cover implements AttributeInterface
{
use DumpTrait;

protected string $binaryCover;

/**
* @var string
*/
protected $binaryCover;

/**
* @param string $cover
*/
public function __construct(string $cover)
{
$this->binaryCover = $cover;
}

/**
* @return string
*/
public function getBinaryCover(): string
{
return $this->binaryCover;
}

/**
* @return string
*/
public function __toString(): string
{
return $this->binaryCover;
Expand Down
14 changes: 1 addition & 13 deletions src/Attribute/Duration.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,18 @@ class Duration implements AttributeInterface
{
use DumpTrait;

/**
* @var int
*/
protected $milliseconds;
protected int $milliseconds;

/**
* @param string|int $duration
*/
public function __construct($duration)
{
$this->milliseconds = (int) $duration;
}

/**
* @return int
*/
public function getMilliseconds(): int
{
return $this->milliseconds;
}

/**
* @return string
*/
public function __toString(): string
{
return (string) $this->milliseconds;
Expand Down
3 changes: 0 additions & 3 deletions src/Attribute/FloatRate.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

class FloatRate extends Rate
{
/**
* @return float
*/
public function getFloatAbsoluteValue(): float
{
return $this->absoluteValue;
Expand Down
27 changes: 4 additions & 23 deletions src/Attribute/Mode.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,26 @@ class Mode implements AttributeInterface
{
use DumpTrait;

/**
* @var string
*/
protected $shortName;

/**
* @var string
*/
protected $fullName;

/**
* @param string $shortName
* @param string $fullName
*/
protected string $shortName;

protected string $fullName;

public function __construct(string $shortName, string $fullName)
{
$this->shortName = $shortName;
$this->fullName = $fullName;
}

/**
* @return string
*/
public function getFullName(): string
{
return $this->fullName;
}

/**
* @return string
*/
public function getShortName(): string
{
return $this->shortName;
}

/**
* @return string
*/
public function __toString(): string
{
return $this->shortName;
Expand Down
20 changes: 2 additions & 18 deletions src/Attribute/Rate.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,29 @@ class Rate implements AttributeInterface
{
use DumpTrait;

/**
* @var float
*/
protected $absoluteValue;
protected float $absoluteValue;

/**
* @var string
*/
protected $textValue;
protected string $textValue;

/**
* @param string|int $absoluteValue
* @param string $textValue
*/
public function __construct($absoluteValue, string $textValue)
{
$this->absoluteValue = (float) $absoluteValue;
$this->textValue = $textValue;
}

/**
* @return int
*/
public function getAbsoluteValue(): int
{
return round($this->absoluteValue);
}

/**
* @return string
*/
public function getTextValue(): string
{
return $this->textValue;
}

/**
* @return string
*/
public function __toString(): string
{
return $this->textValue;
Expand Down
20 changes: 2 additions & 18 deletions src/Attribute/Ratio.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,29 @@ class Ratio implements AttributeInterface
{
use DumpTrait;

/**
* @var float
*/
protected $absoluteValue;
protected float $absoluteValue;

/**
* @var string
*/
protected $textValue;
protected string $textValue;

/**
* @param string|float $absoluteValue
* @param string $textValue
*/
public function __construct($absoluteValue, string $textValue)
{
$this->absoluteValue = (float) $absoluteValue;
$this->textValue = $textValue;
}

/**
* @return float
*/
public function getAbsoluteValue(): float
{
return $this->absoluteValue;
}

/**
* @return string
*/
public function getTextValue(): string
{
return $this->textValue;
}

/**
* @return string
*/
public function __toString(): string
{
return $this->textValue;
Expand Down
11 changes: 1 addition & 10 deletions src/Attribute/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ class Size implements AttributeInterface
{
use DumpTrait;

/**
* @var int
*/
protected $bit;
protected int $bit;

/**
* @param string|int $size
Expand All @@ -21,17 +18,11 @@ public function __construct($size)
$this->bit = (int) $size;
}

/**
* @return int
*/
public function getBit(): int
{
return $this->bit;
}

/**
* @return string
*/
public function __toString(): string
{
return (string) $this->bit;
Expand Down
15 changes: 1 addition & 14 deletions src/Builder/MediaInfoCommandBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
class MediaInfoCommandBuilder
{
/**
* @param string $filePath
* @param array $configuration
*
* @throws \Exception
*
* @return MediaInfoCommandRunner
*/
public function buildMediaInfoCommandRunner(string $filePath, array $configuration = []): MediaInfoCommandRunner
{
Expand Down Expand Up @@ -49,15 +44,7 @@ public function buildMediaInfoCommandRunner(string $filePath, array $configurati
));
}

/**
* @param string $filePath
* @param string|null $command
* @param bool $forceOldXmlOutput
* @param bool $urlencode
*
* @return Process
*/
private function buildMediaInfoProcess(string $filePath, string $command = null, bool $forceOldXmlOutput = true, bool $urlencode = false, bool $includeCoverData = false): Process
private function buildMediaInfoProcess(string $filePath, ?string $command = null, bool $forceOldXmlOutput = true, bool $urlencode = false, bool $includeCoverData = false): Process
{
if ($command === null) {
$command = MediaInfoCommandRunner::MEDIAINFO_COMMAND;
Expand Down
Loading