Skip to content

Commit 3febced

Browse files
authored
chore: fix implicit deprecated warnings (#154)
1 parent c46bd78 commit 3febced

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/Storage/Device/Local.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getRoot(): string
6262
* @param string|null $prefix
6363
* @return string
6464
*/
65-
public function getPath(string $filename, string $prefix = null): string
65+
public function getPath(string $filename, ?string $prefix = null): string
6666
{
6767
return $this->getAbsolutePath($this->getRoot().DIRECTORY_SEPARATOR.$filename);
6868
}
@@ -270,7 +270,7 @@ public function abort(string $path, string $extra = ''): bool
270270
*
271271
* @throws Exception
272272
*/
273-
public function read(string $path, int $offset = 0, int $length = null): string
273+
public function read(string $path, int $offset = 0, ?int $length = null): string
274274
{
275275
if (! $this->exists($path)) {
276276
throw new NotFoundException('File not found');

src/Storage/Device/S3.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public function getRoot(): string
167167
* @param string|null $prefix
168168
* @return string
169169
*/
170-
public function getPath(string $filename, string $prefix = null): string
170+
public function getPath(string $filename, ?string $prefix = null): string
171171
{
172172
return $this->getRoot().DIRECTORY_SEPARATOR.$filename;
173173
}
@@ -410,12 +410,12 @@ public function abort(string $path, string $extra = ''): bool
410410
*
411411
* @param string $path
412412
* @param int offset
413-
* @param int length
413+
* @param int|null length
414414
* @return string
415415
*
416416
* @throws \Exception
417417
*/
418-
public function read(string $path, int $offset = 0, int $length = null): string
418+
public function read(string $path, int $offset = 0, ?int $length = null): string
419419
{
420420
unset($this->amzHeaders['x-amz-acl']);
421421
unset($this->amzHeaders['x-amz-content-sha256']);

src/Storage/Device/Telemetry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function getRoot(): string
5454
return $this->underlying->getRoot();
5555
}
5656

57-
public function getPath(string $filename, string $prefix = null): string
57+
public function getPath(string $filename, ?string $prefix = null): string
5858
{
5959
return $this->measure(__FUNCTION__, $filename, $prefix);
6060
}
@@ -74,7 +74,7 @@ public function abort(string $path, string $extra = ''): bool
7474
return $this->measure(__FUNCTION__, $path, $extra);
7575
}
7676

77-
public function read(string $path, int $offset = 0, int $length = null): string
77+
public function read(string $path, int $offset = 0, ?int $length = null): string
7878
{
7979
return $this->measure(__FUNCTION__, $path, $offset, $length);
8080
}

0 commit comments

Comments
 (0)