Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Exception/DuplicateSchemaException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

namespace Opis\JsonSchema\Exception;

use stdClass, Throwable;
use stdClass;
use Throwable;

class DuplicateSchemaException extends AbstractSchemaException
{
Expand All @@ -38,7 +39,7 @@ class DuplicateSchemaException extends AbstractSchemaException
* @param array $container
* @param Throwable|null $previous
*/
public function __construct(string $id, stdClass $schema, array $container = [], Throwable $previous = null)
public function __construct(string $id, stdClass $schema, array $container = [], ?Throwable $previous = null)
{
$this->id = $id;
$this->schema = $schema;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/FilterNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class FilterNotFoundException extends AbstractSchemaException
* @param string $filter
* @param Throwable|null $previous
*/
public function __construct(string $type, string $filter, Throwable $previous = null)
public function __construct(string $type, string $filter, ?Throwable $previous = null)
{
$this->type = $type;
$this->filter = $filter;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidJsonPointerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class InvalidJsonPointerException extends AbstractSchemaException
* @param string $pointer
* @param Throwable|null $previous
*/
public function __construct(string $pointer, Throwable $previous = null)
public function __construct(string $pointer, ?Throwable $previous = null)
{
$this->pointer = $pointer;
parent::__construct("Invalid JSON pointer: $pointer", 0, $previous);
Expand Down
5 changes: 3 additions & 2 deletions src/Exception/InvalidSchemaDraftException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

namespace Opis\JsonSchema\Exception;

use stdClass, Throwable;
use stdClass;
use Throwable;

class InvalidSchemaDraftException extends AbstractSchemaException
{
Expand All @@ -30,7 +31,7 @@ class InvalidSchemaDraftException extends AbstractSchemaException
* @param stdClass $schema
* @param Throwable|null $previous
*/
public function __construct(stdClass $schema, Throwable $previous = null)
public function __construct(stdClass $schema, ?Throwable $previous = null)
{
$this->schema = $schema;
parent::__construct("Invalid '\$schema' property", 0, $previous);
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidSchemaException.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class InvalidSchemaException extends AbstractSchemaException
* @param $schema
* @param Throwable|null $previous
*/
public function __construct($schema, Throwable $previous = null)
public function __construct($schema, ?Throwable $previous = null)
{
$this->schema = $schema;
$type = is_object($schema) ? get_class($schema) : gettype($schema);
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidSchemaIdException.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class InvalidSchemaIdException extends AbstractSchemaException
* @param string $id
* @param Throwable|null $previous
*/
public function __construct(string $id, Throwable $previous = null)
public function __construct(string $id, ?Throwable $previous = null)
{
$this->id = $id;
parent::__construct("Invalid id '{$id}'", 0, $previous);
Expand Down
5 changes: 3 additions & 2 deletions src/Exception/SchemaDraftNotSupportedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

namespace Opis\JsonSchema\Exception;

use stdClass, Throwable;
use stdClass;
use Throwable;

class SchemaDraftNotSupportedException extends AbstractSchemaException
{
Expand All @@ -34,7 +35,7 @@ class SchemaDraftNotSupportedException extends AbstractSchemaException
* @param string $draft
* @param Throwable|null $previous
*/
public function __construct(stdClass $schema, string $draft, Throwable $previous = null)
public function __construct(stdClass $schema, string $draft, ?Throwable $previous = null)
{
$this->schema = $schema;
$this->draft = $draft;
Expand Down
5 changes: 3 additions & 2 deletions src/Exception/SchemaKeywordException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

namespace Opis\JsonSchema\Exception;

use stdClass, Throwable;
use stdClass;
use Throwable;

class SchemaKeywordException extends AbstractSchemaException
{
Expand All @@ -39,7 +40,7 @@ class SchemaKeywordException extends AbstractSchemaException
* @param string $message
* @param Throwable|null $previous
*/
public function __construct(stdClass $schema, string $keyword, $value, string $message, Throwable $previous = null)
public function __construct(stdClass $schema, string $keyword, $value, string $message, ?Throwable $previous = null)
{
$this->schema = $schema;
$this->keyword = $keyword;
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/SchemaNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SchemaNotFoundException extends AbstractSchemaException
* @param string $id
* @param Throwable|null $previous
*/
public function __construct(string $id, Throwable $previous = null)
public function __construct(string $id, ?Throwable $previous = null)
{
$this->id = $id;
parent::__construct("Schema '{$id}' was not found or could not be loaded", 0, $previous);
Expand Down
5 changes: 3 additions & 2 deletions src/Exception/UnknownMediaTypeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

namespace Opis\JsonSchema\Exception;

use stdClass, Throwable;
use stdClass;
use Throwable;

class UnknownMediaTypeException extends AbstractSchemaException
{
Expand All @@ -31,7 +32,7 @@ class UnknownMediaTypeException extends AbstractSchemaException
/**
* @inheritDoc
*/
public function __construct(stdClass $schema, string $media, Throwable $previous = null)
public function __construct(stdClass $schema, string $media, ?Throwable $previous = null)
{
$this->schema = $schema;
$this->media = $media;
Expand Down