Skip to content

Commit 97f9e54

Browse files
committed
fixed default values
1 parent 673ccd1 commit 97f9e54

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/PhpGenerator/Method.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public function getBody()
106106
/**
107107
* @return static
108108
*/
109-
public function setStatic(bool $val): self
109+
public function setStatic(bool $state = TRUE): self
110110
{
111-
$this->static = $val;
111+
$this->static = $state;
112112
return $this;
113113
}
114114

@@ -122,9 +122,9 @@ public function isStatic(): bool
122122
/**
123123
* @return static
124124
*/
125-
public function setFinal(bool $val): self
125+
public function setFinal(bool $state = TRUE): self
126126
{
127-
$this->final = $val;
127+
$this->final = $state;
128128
return $this;
129129
}
130130

@@ -138,9 +138,9 @@ public function isFinal(): bool
138138
/**
139139
* @return static
140140
*/
141-
public function setAbstract(bool $val): self
141+
public function setAbstract(bool $state = TRUE): self
142142
{
143-
$this->abstract = $val;
143+
$this->abstract = $state;
144144
return $this;
145145
}
146146

src/PhpGenerator/Traits/FunctionLike.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ trait FunctionLike
3636
private $returnReference = FALSE;
3737

3838
/** @var bool */
39-
private $returnNullable;
39+
private $returnNullable = FALSE;
4040

4141
/** @var PhpNamespace|NULL */
4242
private $namespace;
@@ -110,9 +110,9 @@ public function addParameter(string $name, $defaultValue = NULL): Parameter
110110
/**
111111
* @return static
112112
*/
113-
public function setVariadic(bool $val): self
113+
public function setVariadic(bool $state = TRUE): self
114114
{
115-
$this->variadic = $val;
115+
$this->variadic = $state;
116116
return $this;
117117
}
118118

@@ -146,9 +146,9 @@ public function getReturnType()
146146
/**
147147
* @return static
148148
*/
149-
public function setReturnReference(bool $val): self
149+
public function setReturnReference(bool $state = TRUE): self
150150
{
151-
$this->returnReference = $val;
151+
$this->returnReference = $state;
152152
return $this;
153153
}
154154

@@ -162,9 +162,9 @@ public function getReturnReference(): bool
162162
/**
163163
* @return static
164164
*/
165-
public function setReturnNullable(bool $val): self
165+
public function setReturnNullable(bool $state = TRUE): self
166166
{
167-
$this->returnNullable = $val;
167+
$this->returnNullable = $state;
168168
return $this;
169169
}
170170

0 commit comments

Comments
 (0)