Skip to content

Commit 0f793a9

Browse files
authored
Merge branch '4.1' into 4.1
2 parents f344d22 + 4f717c1 commit 0f793a9

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

src/OpenApi/Model/Parameter.php

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,8 @@ final class Parameter
1717
{
1818
use ExtensionTrait;
1919

20-
public function __construct(
21-
private string $name,
22-
private string $in,
23-
private string $description = '',
24-
private bool $required = false,
25-
private bool $deprecated = false,
26-
private bool $allowEmptyValue = false,
27-
private array $schema = [],
28-
private ?string $style = null,
29-
private bool $explode = false,
30-
private bool $allowReserved = false,
31-
private $example = null,
32-
private ?\ArrayObject $examples = null,
33-
private ?\ArrayObject $content = null,
34-
) {
20+
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)
21+
{
3522
if (null === $style) {
3623
if ('query' === $in || 'cookie' === $in) {
3724
$this->style = 'form';
@@ -161,7 +148,7 @@ public function withDeprecated(bool $deprecated): self
161148
return $clone;
162149
}
163150

164-
public function withAllowEmptyValue(bool $allowEmptyValue): self
151+
public function withAllowEmptyValue(?bool $allowEmptyValue): self
165152
{
166153
$clone = clone $this;
167154
$clone->allowEmptyValue = $allowEmptyValue;
@@ -193,7 +180,7 @@ public function withExplode(bool $explode): self
193180
return $clone;
194181
}
195182

196-
public function withAllowReserved(bool $allowReserved): self
183+
public function withAllowReserved(?bool $allowReserved): self
197184
{
198185
$clone = clone $this;
199186
$clone->allowReserved = $allowReserved;

0 commit comments

Comments
 (0)