Skip to content
Merged
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
6 changes: 3 additions & 3 deletions src/OpenApi/Model/Parameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class Parameter
{
use ExtensionTrait;

public function __construct(private string $name, private string $in, private string $description = '', private bool $required = false, private bool $deprecated = false, private bool $allowEmptyValue = false, private array $schema = [], private ?string $style = null, private bool $explode = false, private bool $allowReserved = false, private $example = null, private ?\ArrayObject $examples = null, private ?\ArrayObject $content = null)
public function __construct(private string $name, private string $in, private string $description = '', private bool $required = false, private bool $deprecated = false, private ?bool $allowEmptyValue = false, private array $schema = [], private ?string $style = null, private bool $explode = false, private ?bool $allowReserved = false, private $example = null, private ?\ArrayObject $examples = null, private ?\ArrayObject $content = null)
{
if (null === $style) {
if ('query' === $in || 'cookie' === $in) {
Expand Down Expand Up @@ -148,7 +148,7 @@ public function withDeprecated(bool $deprecated): self
return $clone;
}

public function withAllowEmptyValue(bool $allowEmptyValue): self
public function withAllowEmptyValue(?bool $allowEmptyValue): self
{
$clone = clone $this;
$clone->allowEmptyValue = $allowEmptyValue;
Expand Down Expand Up @@ -180,7 +180,7 @@ public function withExplode(bool $explode): self
return $clone;
}

public function withAllowReserved(bool $allowReserved): self
public function withAllowReserved(?bool $allowReserved): self
{
$clone = clone $this;
$clone->allowReserved = $allowReserved;
Expand Down
Loading