Skip to content

Commit

Permalink
Add hasTrait method (#163)
Browse files Browse the repository at this point in the history
Add hasTrait method copying other Aware Traits
  • Loading branch information
tm1000 authored Sep 10, 2024
1 parent bfed454 commit 32648ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/PhpGenerator/Traits/TraitsAware.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
}

0 comments on commit 32648ab

Please sign in to comment.