Skip to content

Commit

Permalink
Merge pull request #132 from skyeewers/master
Browse files Browse the repository at this point in the history
Fix incompatible type in RepsCollection and composer.json being outdated.
  • Loading branch information
aminyazdanpanah authored Apr 9, 2023
2 parents 52a8fc3 + 298fc26 commit 7c2b2bc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"require-dev": {
"phpunit/phpunit": "^8.4",
"aws/aws-sdk-php": "^3.0@dev",
"google/cloud-storage": "dev-master",
"google/cloud-storage": "dev-main",
"microsoft/azure-storage-blob": "dev-master"
},
"autoload-dev": {
Expand Down
5 changes: 3 additions & 2 deletions src/AutoReps.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use FFMpeg\Format\VideoInterface;
use Streaming\Exception\InvalidArgumentException;
use Streaming\Exception\RuntimeException;
use Traversable;


class AutoReps implements \IteratorAggregate
Expand Down Expand Up @@ -93,7 +94,7 @@ private function getKiloBitRate(): int
return intval(($this->original_format->get('bit_rate') / 1024) * .9);
}

return (int)$this->video->get('bit_rate') / 1024;
return intval($this->video->get('bit_rate') / 1024);
}

/**
Expand Down Expand Up @@ -231,7 +232,7 @@ public function getKBitrate(): array
* Retrieve an external iterator reps
* @return \Traversable An instance of an object implementing <b>Iterator</b> or <b>Traversable</b>
*/
public function getIterator()
public function getIterator(): Traversable
{
$reps = $this->getCalculatedReps();
array_push($reps, $this->getOriginalRep());
Expand Down
2 changes: 1 addition & 1 deletion src/RepsCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function count(): int
/**
* {@inheritdoc}
*/
public function getIterator()
public function getIterator(): \Traversable
{
return new \ArrayIterator($this->representations);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public function metadata(): Metadata
public function __destruct()
{
// make sure that FFmpeg process has benn terminated
sleep(.5);
sleep(1);
File::remove($this->tmp_dir);

if ($this->media->isTmp()) {
Expand Down

0 comments on commit 7c2b2bc

Please sign in to comment.