Skip to content

Commit

Permalink
Fix implicit nullable parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Apr 21, 2024
1 parent 6b82161 commit 72f6071
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Driver/ParallelFilesystemDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/FileCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function get(string $key): ?string
}
}

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");
Expand Down
2 changes: 1 addition & 1 deletion src/FilesystemException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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);
}
Expand Down

0 comments on commit 72f6071

Please sign in to comment.