diff --git a/composer.json b/composer.json index 8eb45da..3a2048b 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.2", + "php": ">=7.2", "symfony/process": "^4.2|^5.0" }, "require-dev": { diff --git a/src/Media/Media.php b/src/Media/Media.php index 19bef64..2d66923 100644 --- a/src/Media/Media.php +++ b/src/Media/Media.php @@ -26,7 +26,7 @@ class Media extends ExportMedia implements MediaInterface * @return Media * @throws MediaException */ - public function DRM(string $encryption, callable $options = null) + public function DRM(string $encryption, ?callable $options = null) { $class_name = '\Shaka\Options\DRM\\' . ucwords($encryption); @@ -47,7 +47,7 @@ public function DRM(string $encryption, callable $options = null) * @return $this * @throws MediaException */ - public function HLS(string $output, callable $options = null) + public function HLS(string $output, ?callable $options = null) { $hls = new HLS(); $hls = $hls->HLSMasterPlaylistOutput($output); @@ -62,7 +62,7 @@ public function HLS(string $output, callable $options = null) * @return $this * @throws MediaException */ - public function DASH(string $output, callable $options = null) + public function DASH(string $output, ?callable $options = null) { $dash = new DASH(); $dash = $dash->mpdOutput($output); diff --git a/src/Media/MediaInterface.php b/src/Media/MediaInterface.php index 8aee538..870220a 100644 --- a/src/Media/MediaInterface.php +++ b/src/Media/MediaInterface.php @@ -22,19 +22,19 @@ interface MediaInterface * @param callable|null $options * @return $this */ - public function DASH(string $output, callable $options = null); + public function DASH(string $output, ?callable $options = null); /** * @param string $output * @param callable|null $options * @return $this */ - public function HLS(string $output, callable $options = null); + public function HLS(string $output, ?callable $options = null); /** * @param string $encryption * @param callable|null $options * @return Media */ - public function DRM(string $encryption, callable $options = null); + public function DRM(string $encryption, ?callable $options = null); } \ No newline at end of file diff --git a/src/helpers.php b/src/helpers.php index d25cfcd..c72a3f9 100644 --- a/src/helpers.php +++ b/src/helpers.php @@ -17,7 +17,7 @@ * @return mixed * @throws \Shaka\Exception\ProcessException */ - function shaka(string $binary = null) + function shaka(?string $binary = null) { return \Shaka\Shaka::initialize($binary); }