Skip to content

Commit 7cefed6

Browse files
committed
fixed default values
1 parent db6fdfb commit 7cefed6

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
@@ -107,9 +107,9 @@ public function getBody()
107107
* @param bool
108108
* @return static
109109
*/
110-
public function setStatic($val)
110+
public function setStatic($state = TRUE)
111111
{
112-
$this->static = (bool) $val;
112+
$this->static = (bool) $state;
113113
return $this;
114114
}
115115

@@ -127,9 +127,9 @@ public function isStatic()
127127
* @param bool
128128
* @return static
129129
*/
130-
public function setFinal($val)
130+
public function setFinal($state = TRUE)
131131
{
132-
$this->final = (bool) $val;
132+
$this->final = (bool) $state;
133133
return $this;
134134
}
135135

@@ -147,9 +147,9 @@ public function isFinal()
147147
* @param bool
148148
* @return static
149149
*/
150-
public function setAbstract($val)
150+
public function setAbstract($state = TRUE)
151151
{
152-
$this->abstract = (bool) $val;
152+
$this->abstract = (bool) $state;
153153
return $this;
154154
}
155155

src/PhpGenerator/Traits/FunctionLike.php

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

3636
/** @var bool */
37-
private $returnNullable;
37+
private $returnNullable = FALSE;
3838

3939
/** @var PhpNamespace|NULL */
4040
private $namespace;
@@ -115,9 +115,9 @@ public function addParameter($name, $defaultValue = NULL)
115115
* @param bool
116116
* @return static
117117
*/
118-
public function setVariadic($val)
118+
public function setVariadic($state = TRUE)
119119
{
120-
$this->variadic = (bool) $val;
120+
$this->variadic = (bool) $state;
121121
return $this;
122122
}
123123

@@ -155,9 +155,9 @@ public function getReturnType()
155155
* @param bool
156156
* @return static
157157
*/
158-
public function setReturnReference($val)
158+
public function setReturnReference($state = TRUE)
159159
{
160-
$this->returnReference = (bool) $val;
160+
$this->returnReference = (bool) $state;
161161
return $this;
162162
}
163163

@@ -175,9 +175,9 @@ public function getReturnReference()
175175
* @param bool
176176
* @return static
177177
*/
178-
public function setReturnNullable($val)
178+
public function setReturnNullable($state = TRUE)
179179
{
180-
$this->returnNullable = (bool) $val;
180+
$this->returnNullable = (bool) $state;
181181
return $this;
182182
}
183183

0 commit comments

Comments
 (0)