Skip to content

Commit 81a5a06

Browse files
committed
refactoring
1 parent 6a360de commit 81a5a06

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
@@ -216,12 +216,12 @@ public function isAbstract(): bool
216216
* @param string|string[]
217217
* @return static
218218
*/
219-
public function setExtends($types): self
219+
public function setExtends($names): self
220220
{
221-
if (!is_string($types) && !(is_array($types) && Nette\Utils\Arrays::every($types, 'is_string'))) {
221+
if (!is_string($names) && !(is_array($names) && Nette\Utils\Arrays::every($names, 'is_string'))) {
222222
throw new Nette\InvalidArgumentException('Argument must be string or string[].');
223223
}
224-
$this->extends = $types;
224+
$this->extends = $names;
225225
return $this;
226226
}
227227

@@ -238,10 +238,10 @@ public function getExtends()
238238
/**
239239
* @return static
240240
*/
241-
public function addExtend(string $type): self
241+
public function addExtend(string $name): self
242242
{
243243
$this->extends = (array) $this->extends;
244-
$this->extends[] = $type;
244+
$this->extends[] = $name;
245245
return $this;
246246
}
247247

@@ -250,9 +250,9 @@ public function addExtend(string $type): self
250250
* @param string[]
251251
* @return static
252252
*/
253-
public function setImplements(array $types): self
253+
public function setImplements(array $names): self
254254
{
255-
$this->implements = $types;
255+
$this->implements = $names;
256256
return $this;
257257
}
258258

@@ -269,9 +269,9 @@ public function getImplements(): array
269269
/**
270270
* @return static
271271
*/
272-
public function addImplement(string $type): self
272+
public function addImplement(string $name): self
273273
{
274-
$this->implements[] = $type;
274+
$this->implements[] = $name;
275275
return $this;
276276
}
277277

@@ -280,9 +280,9 @@ public function addImplement(string $type): self
280280
* @param string[]
281281
* @return static
282282
*/
283-
public function setTraits(array $traits): self
283+
public function setTraits(array $names): self
284284
{
285-
$this->traits = array_fill_keys($traits, []);
285+
$this->traits = array_fill_keys($names, []);
286286
return $this;
287287
}
288288

@@ -299,9 +299,9 @@ public function getTraits(): array
299299
/**
300300
* @return static
301301
*/
302-
public function addTrait(string $trait, array $resolutions = []): self
302+
public function addTrait(string $name, array $resolutions = []): self
303303
{
304-
$this->traits[$trait] = $resolutions;
304+
$this->traits[$name] = $resolutions;
305305
return $this;
306306
}
307307

0 commit comments

Comments
 (0)