Skip to content

Commit

Permalink
pint
Browse files Browse the repository at this point in the history
  • Loading branch information
recca0120 committed Apr 11, 2024
1 parent 13c2e34 commit db28610
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/ChunkFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public function __construct(
string $name,
string $chunkPath,
string $storagePath,
string $token = null,
string $mimeType = null
?string $token = null,
?string $mimeType = null
) {
$this->files = $files;
$this->name = $name;
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ abstract class Api implements ApiContract
*/
protected $config;

public function __construct($config = [], Request $request = null, Filesystem $files = null)
public function __construct($config = [], ?Request $request = null, ?Filesystem $files = null)
{
$this->request = $request ?: Request::capture();
$this->files = $files ?: new Filesystem();
Expand Down Expand Up @@ -128,7 +128,7 @@ protected function storagePath(): string
return rtrim($this->config['storage'], '/').'/';
}

protected function createChunkFile(string $name, string $uuid = null, string $mimeType = null): ChunkFile
protected function createChunkFile(string $name, ?string $uuid = null, ?string $mimeType = null): ChunkFile
{
return new ChunkFile($this->files, $name, $this->chunkPath(), $this->storagePath(), $uuid, $mimeType);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function basename($path): string
return pathinfo($path, PATHINFO_BASENAME);
}

public function tmpfilename(string $path, string $hash = null): string
public function tmpfilename(string $path, ?string $hash = null): string
{
if (empty($hash)) {
$hash = md5($path);
Expand Down
2 changes: 1 addition & 1 deletion src/Receiver.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct(ApiContract $api)
$this->api = $api;
}

public function receive(string $inputName = 'file', callable $callback = null): Response
public function receive(string $inputName = 'file', ?callable $callback = null): Response
{
try {
$callback = $callback ?: [$this, 'callback'];
Expand Down
2 changes: 1 addition & 1 deletion src/UploadManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class UploadManager extends Manager
*/
protected $files;

public function __construct(Container $container, Request $request = null, Filesystem $files = null)
public function __construct(Container $container, ?Request $request = null, ?Filesystem $files = null)
{
parent::__construct($container);
$this->request = $request ?: Request::capture();
Expand Down

0 comments on commit db28610

Please sign in to comment.