diff --git a/src/Exceptions/FileNotFoundException.php b/src/Exceptions/FileNotFoundException.php index 84a896c5..b2dd5d5b 100644 --- a/src/Exceptions/FileNotFoundException.php +++ b/src/Exceptions/FileNotFoundException.php @@ -6,7 +6,7 @@ class FileNotFoundException extends BaseException { - public function __construct(string $filePath = null) + public function __construct(?string $filePath = null) { parent::__construct("Documentation file not found {$filePath}"); } diff --git a/src/Exceptions/MissedProductionFilePathException.php b/src/Exceptions/MissedProductionFilePathException.php index 651f15d7..5284e8d5 100755 --- a/src/Exceptions/MissedProductionFilePathException.php +++ b/src/Exceptions/MissedProductionFilePathException.php @@ -6,7 +6,7 @@ class MissedProductionFilePathException extends Exception { - public function __construct($message = null, $code = 0, Exception $previous = null) + public function __construct($message = null, $code = 0, ?Exception $previous = null) { $message = $message ?? 'Production file path missed in config'; diff --git a/src/Exceptions/MissedRemoteDocumentationUrlException.php b/src/Exceptions/MissedRemoteDocumentationUrlException.php index ce20a795..90a0d758 100644 --- a/src/Exceptions/MissedRemoteDocumentationUrlException.php +++ b/src/Exceptions/MissedRemoteDocumentationUrlException.php @@ -6,7 +6,7 @@ class MissedRemoteDocumentationUrlException extends Exception { - public function __construct($message = null, $code = 0, Exception $previous = null) + public function __construct($message = null, $code = 0, ?Exception $previous = null) { $message = $message ?? 'Remote documentation url missed in config. Please set SWAGGER_REMOTE_DRIVER_URL env variable to define this one.'; diff --git a/src/Exceptions/SpecValidation/MissingFieldException.php b/src/Exceptions/SpecValidation/MissingFieldException.php index fa5125b6..3ea58dbd 100644 --- a/src/Exceptions/SpecValidation/MissingFieldException.php +++ b/src/Exceptions/SpecValidation/MissingFieldException.php @@ -4,7 +4,7 @@ class MissingFieldException extends InvalidSwaggerSpecException { - public function __construct(array $missingFields, string $parentField = null) + public function __construct(array $missingFields, ?string $parentField = null) { $fieldsString = implode(', ', $missingFields);