diff --git a/src/PhpGenerator/Traits/TraitsAware.php b/src/PhpGenerator/Traits/TraitsAware.php index adf2ad4f..23bdc4e2 100644 --- a/src/PhpGenerator/Traits/TraitsAware.php +++ b/src/PhpGenerator/Traits/TraitsAware.php @@ -67,4 +67,9 @@ public function removeTrait(string $name): static unset($this->traits[$name]); return $this; } + + public function hasTrait(string $name): bool + { + return isset($this->traits[$name]); + } }