Skip to content

Commit 32648ab

Browse files
authored
Add hasTrait method (#163)
Add hasTrait method copying other Aware Traits
1 parent bfed454 commit 32648ab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/PhpGenerator/Traits/TraitsAware.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,9 @@ public function removeTrait(string $name): static
6767
unset($this->traits[$name]);
6868
return $this;
6969
}
70+
71+
public function hasTrait(string $name): bool
72+
{
73+
return isset($this->traits[$name]);
74+
}
7075
}

0 commit comments

Comments
 (0)