@@ -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