Skip to content

Commit

Permalink
Update code style after PHP CS Fixer update
Browse files Browse the repository at this point in the history
  • Loading branch information
niels-nijens committed Mar 19, 2024
1 parent 382ecf5 commit 67ca746
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public function __construct(
string $title,
int $statusCode,
string $message = '',
Throwable $previous = null,
string $instanceUri = null,
?Throwable $previous = null,
?string $instanceUri = null,
array $headers = [],
array $violations = []
) {
Expand Down
10 changes: 5 additions & 5 deletions src/ExceptionHandling/Exception/ProblemException.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public function __construct(
string $title,
int $statusCode,
string $message = '',
Throwable $previous = null,
string $instanceUri = null,
?Throwable $previous = null,
?string $instanceUri = null,
array $headers = []
) {
parent::__construct($message, 0, $previous);
Expand Down Expand Up @@ -154,10 +154,10 @@ public function jsonSerialize(): array

public static function fromHttpException(
HttpExceptionInterface $exception,
int $statusCode = null,
?int $statusCode = null,
string $typeUri = self::DEFAULT_TYPE_URI,
string $title = self::DEFAULT_TITLE,
string $instanceUri = null
?string $instanceUri = null
): self {
if ($statusCode === null) {
$statusCode = $exception->getStatusCode();
Expand All @@ -179,7 +179,7 @@ public static function fromThrowable(
int $statusCode = 500,
string $typeUri = self::DEFAULT_TYPE_URI,
string $title = self::DEFAULT_TITLE,
string $instanceUri = null
?string $instanceUri = null
): self {
return new static($typeUri, $title, $statusCode, $throwable->getMessage(), $throwable, $instanceUri);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ExceptionHandling/Exception/Violation.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Violation implements ViolationInterface
*/
private $propertyPath;

public function __construct(string $constraint, string $message, string $propertyPath = null)
public function __construct(string $constraint, string $message, ?string $propertyPath = null)
{
$this->constraint = $constraint;
$this->message = $message;
Expand Down
2 changes: 1 addition & 1 deletion src/Json/JsonPointer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class JsonPointer implements JsonPointerInterface
/**
* Constructs a new {@see JsonPointer} instance.
*/
public function __construct(stdClass $json = null)
public function __construct(?stdClass $json = null)
{
$this->json = $json;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Json/Schema/Constraint/TypeConstraint.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TypeConstraint extends BaseTypeConstraint
/**
* {@inheritdoc}
*/
public function check(&$value = null, $schema = null, JsonPointer $path = null, $i = null): void
public function check(&$value = null, $schema = null, ?JsonPointer $path = null, $i = null): void
{
$type = $schema->type ?? null;
$nullable = $schema->nullable ?? false;
Expand Down

0 comments on commit 67ca746

Please sign in to comment.