Skip to content

Commit

Permalink
docs: improve my english xD
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemorroj committed May 7, 2021
1 parent 8d1757d commit 0f413c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/TagsManagerTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ trait TagsManagerTrait
/**
* Add tag.
*
* @param class-string<ExtTagInterface> $tag class name. Must implements ExtTagInterface interface
* @param class-string<ExtTagInterface> $tag class name. Must implements the ExtTagInterface interface
*
* @return $this
*/
public function addTag(string $tag): self
{
$implements = \class_implements($tag);
$implements = @\class_implements($tag);
if (false === $implements) {
throw new Exception(\sprintf('Unknown tag %s', $tag));
throw new Exception(\sprintf('Unknown class %s', $tag));
}
if (!\in_array(ExtTagInterface::class, $implements, true)) {
throw new Exception(\sprintf('The class %s must be implement interface %s', $tag, ExtTagInterface::class));
throw new Exception(\sprintf('The class %s must implements the %s interface', $tag, ExtTagInterface::class));
}

$this->tags[] = $tag;
Expand Down

0 comments on commit 0f413c1

Please sign in to comment.