Skip to content

Commit

Permalink
Implement Stringable interface (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwalk authored Mar 20, 2024
1 parent c27077b commit 8dedfb0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/Wrappers/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace Contributte\Translation\Wrappers;

class Message
use Stringable;

class Message implements Stringable
{

public string $message;
Expand All @@ -22,4 +24,10 @@ public function __construct(
$this->parameters = $parameters;
}


public function __toString(): string
{
return $this->message;
}

}
10 changes: 9 additions & 1 deletion src/Wrappers/NotTranslate.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace Contributte\Translation\Wrappers;

class NotTranslate
use Stringable;

class NotTranslate implements Stringable
{

public string $message;
Expand All @@ -14,4 +16,10 @@ public function __construct(
$this->message = $message;
}


public function __toString(): string
{
return $this->message;
}

}

0 comments on commit 8dedfb0

Please sign in to comment.