1
0
mirror of https://github.com/danog/file.git synced 2024-11-30 04:19:39 +01:00

Fix implicit nullable parameters

This commit is contained in:
Aaron Piotrowski 2024-04-21 09:47:27 -05:00
parent 6b82161f20
commit 72f6071616
No known key found for this signature in database
GPG Key ID: 5B456E6AABA44A63
3 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ final class ParallelFilesystemDriver implements FilesystemDriver
/**
* @param int $workerLimit Maximum number of workers to use from the pool for open files.
*/
public function __construct(WorkerPool $pool = null, int $workerLimit = self::DEFAULT_WORKER_LIMIT)
public function __construct(?WorkerPool $pool = null, int $workerLimit = self::DEFAULT_WORKER_LIMIT)
{
$this->pool = $pool ?? workerPool();
$this->workerLimit = $workerLimit;

View File

@ -119,7 +119,7 @@ final class FileCache implements StringCache
}
}
public function set(string $key, string $value, int $ttl = null): void
public function set(string $key, string $value, ?int $ttl = null): void
{
if ($ttl < 0) {
throw new \Error("Invalid cache TTL ({$ttl}); integer >= 0 or null required");

View File

@ -4,7 +4,7 @@ namespace Amp\File;
class FilesystemException extends \Exception
{
public function __construct(string $message, \Throwable $previous = null)
public function __construct(string $message, ?\Throwable $previous = null)
{
parent::__construct($message, 0, $previous);
}