diff --git a/src/Exceptions/DocumentParseError.php b/src/Exceptions/DocumentParseError.php index ccf70c6..4fdeed8 100644 --- a/src/Exceptions/DocumentParseError.php +++ b/src/Exceptions/DocumentParseError.php @@ -17,7 +17,7 @@ public static function unknownFormat(string $format): self )); } - public static function invalidContent(string $file, string $errorMessage = null): self + public static function invalidContent(string $file, ?string $errorMessage = null): self { $message = sprintf( 'File "%s" don\'t seam to contain a valid json/yaml document', diff --git a/src/Exceptions/Path.php b/src/Exceptions/Path.php index 4f6d78e..db4a913 100644 --- a/src/Exceptions/Path.php +++ b/src/Exceptions/Path.php @@ -4,7 +4,7 @@ final class Path extends \RuntimeException { - public static function notFound(string $path = null): self + public static function notFound(?string $path = null): self { return new self('Json path to value not found. ' . $path); }