diff --git a/src/Archive7z.php b/src/Archive7z.php index 0a81863..c9e91d3 100644 --- a/src/Archive7z.php +++ b/src/Archive7z.php @@ -91,7 +91,7 @@ class Archive7z * * @throws Exception */ - public function __construct(string $filename, string $binary7z = null, ?float $timeout = 60.0) + public function __construct(string $filename, ?string $binary7z = null, ?float $timeout = 60.0) { $this->filename = $filename; $this->timeout = $timeout; @@ -103,7 +103,7 @@ public function __construct(string $filename, string $binary7z = null, ?float $t * * @throws Exception */ - public static function get7zipInformation(string $binary7z = null): string + public static function get7zipInformation(?string $binary7z = null): string { $binary7z ??= static::makeBinary7z($binary7z); @@ -339,7 +339,7 @@ public function getEntry(string $path): ?Entry * * @return Entry[] */ - public function getEntries(string $pathMask = null, int $limit = null): array + public function getEntries(?string $pathMask = null, ?int $limit = null): array { $process = $this->makeProcess('l', \array_merge( ['-slt'], diff --git a/src/Archive7zTrait.php b/src/Archive7zTrait.php index 82d0988..c101c04 100644 --- a/src/Archive7zTrait.php +++ b/src/Archive7zTrait.php @@ -48,7 +48,7 @@ protected static function getAutoBinary7z(): ?string /** * @throws Exception */ - protected static function makeBinary7z(string $binary7z = null): string + protected static function makeBinary7z(?string $binary7z = null): string { if (null === $binary7z) { $binary7z = static::getAutoBinary7z(); diff --git a/src/Parser.php b/src/Parser.php index fb54d1f..ddf5d87 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -87,7 +87,7 @@ public function parseHeader(): array /** * @return array> */ - public function parseEntries(int $limit = null): array + public function parseEntries(?int $limit = null): array { $isHead = true; $list = [];