Valinor/tests/Fake/Mapper/Tree/Message/FakeMessage.php

29 lines
542 B
PHP
Raw Normal View History

2021-11-28 17:43:02 +01:00
<?php
declare(strict_types=1);
namespace CuyZ\Valinor\Tests\Fake\Mapper\Tree\Message;
use CuyZ\Valinor\Mapper\Tree\Message\HasCode;
2021-11-28 17:43:02 +01:00
use CuyZ\Valinor\Mapper\Tree\Message\Message;
final class FakeMessage implements Message, HasCode
2021-11-28 17:43:02 +01:00
{
private string $message;
public function __construct(string $message = 'some message')
{
$this->message = $message;
}
2021-11-28 17:43:02 +01:00
public function __toString(): string
{
return $this->message;
}
public function code(): string
{
return 'some_code';
2021-11-28 17:43:02 +01:00
}
}