Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Driver/ParallelDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class ParallelDriver implements Driver
/**
* @param Pool|null $pool
*/
public function __construct(Pool $pool = null)
public function __construct(?Pool $pool = null)
{
$this->pool = $pool ?: Worker\pool();
}
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
4 changes: 2 additions & 2 deletions src/Internal/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class Cache
* collected.
* @param int|null $maxSize The maximum size of cache array (number of elements).
*/
public function __construct(int $gcInterval = 1000, int $maxSize = null)
public function __construct(int $gcInterval = 1000, ?int $maxSize = null)
{
// By using a shared state object we're able to use `__destruct()` for "normal" garbage collection of both this
// instance and the loop's watcher. Otherwise this object could only be GC'd when the TTL watcher was cancelled
Expand Down Expand Up @@ -89,7 +89,7 @@ public function get(string $key)
return $this->sharedState->cache[$key];
}

public function set(string $key, $value, int $ttl = null): void
public function set(string $key, $value, ?int $ttl = null): void
{
if ($ttl === null) {
unset($this->sharedState->cacheTimeouts[$key]);
Expand Down
2 changes: 1 addition & 1 deletion src/Internal/FileTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static function makeId(int $id): string
*
* @throws \Error
*/
public function __construct(string $operation, array $args = [], int $id = null)
public function __construct(string $operation, array $args = [], ?int $id = null)
{
if ($operation === '') {
throw new \Error('Operation must be a non-empty string');
Expand Down
2 changes: 1 addition & 1 deletion src/PendingOperationError.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ final class PendingOperationError extends \Error
public function __construct(
string $message = "The previous file operation must complete before another can be started",
int $code = 0,
\Throwable $previous = null
?\Throwable $previous = null
) {
parent::__construct($message, $code, $previous);
}
Expand Down
Loading