Skip to content

Commit e392e90

Browse files
committed
refactoring
1 parent 7ae59bf commit e392e90

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/PhpGenerator/ClassType.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,12 @@ public function isAbstract()
229229
* @param string|string[]
230230
* @return static
231231
*/
232-
public function setExtends($types)
232+
public function setExtends($names)
233233
{
234-
if (!is_string($types) && !(is_array($types) && Nette\Utils\Arrays::every($types, 'is_string'))) {
234+
if (!is_string($names) && !(is_array($names) && Nette\Utils\Arrays::every($names, 'is_string'))) {
235235
throw new Nette\InvalidArgumentException('Argument must be string or string[].');
236236
}
237-
$this->extends = $types;
237+
$this->extends = $names;
238238
return $this;
239239
}
240240

@@ -252,10 +252,10 @@ public function getExtends()
252252
* @param string
253253
* @return static
254254
*/
255-
public function addExtend($type)
255+
public function addExtend($name)
256256
{
257257
$this->extends = (array) $this->extends;
258-
$this->extends[] = (string) $type;
258+
$this->extends[] = (string) $name;
259259
return $this;
260260
}
261261

@@ -264,9 +264,9 @@ public function addExtend($type)
264264
* @param string[]
265265
* @return static
266266
*/
267-
public function setImplements(array $types)
267+
public function setImplements(array $names)
268268
{
269-
$this->implements = $types;
269+
$this->implements = $names;
270270
return $this;
271271
}
272272

@@ -284,9 +284,9 @@ public function getImplements()
284284
* @param string
285285
* @return static
286286
*/
287-
public function addImplement($type)
287+
public function addImplement($name)
288288
{
289-
$this->implements[] = (string) $type;
289+
$this->implements[] = (string) $name;
290290
return $this;
291291
}
292292

@@ -295,9 +295,9 @@ public function addImplement($type)
295295
* @param string[]
296296
* @return static
297297
*/
298-
public function setTraits(array $traits)
298+
public function setTraits(array $names)
299299
{
300-
$this->traits = array_fill_keys($traits, []);
300+
$this->traits = array_fill_keys($names, []);
301301
return $this;
302302
}
303303

@@ -315,9 +315,9 @@ public function getTraits()
315315
* @param string
316316
* @return static
317317
*/
318-
public function addTrait($trait, array $resolutions = [])
318+
public function addTrait($name, array $resolutions = [])
319319
{
320-
$this->traits[$trait] = $resolutions;
320+
$this->traits[$name] = $resolutions;
321321
return $this;
322322
}
323323

0 commit comments

Comments
 (0)