Skip to content

Commit ecc1d73

Browse files
make properties explicitly nullable (#78)
* made external id explicitly nullable * fix: make constructor parameters explicitly nullable to avoid deprecation warnings --------- Co-authored-by: Maarten Paauw <github@paauw.dev>
1 parent c936277 commit ecc1d73

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Exception extends RuntimeException
1414
/**
1515
* @param array<string|int> $args
1616
*/
17-
public function __construct(string $message, array $args = [], Throwable $previous = null)
17+
public function __construct(string $message, array $args = [], ?Throwable $previous = null)
1818
{
1919
$message = $args ? vsprintf($message, $args) : $message;
2020

src/Hydration/HydrationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class HydrationException extends Exception
1212
/**
1313
* @param array<string|int> $args
1414
*/
15-
public function __construct(string $message, array $args = [], Throwable $previous = null)
15+
public function __construct(string $message, array $args = [], ?Throwable $previous = null)
1616
{
1717
parent::__construct("FromArray Error: {$message}", $args, $previous);
1818
}

src/Kit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public static function divider(?string $blockId = null): Blocks\Divider
120120
}
121121

122122
public static function file(
123-
string $externalId = null,
123+
?string $externalId = null,
124124
?string $source = 'remote',
125125
?string $blockId = null,
126126
): Blocks\File {

0 commit comments

Comments
 (0)