2021-11-28 17:43:02 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace CuyZ\Valinor\Tests\Fake\Mapper\Tree\Message;
|
|
|
|
|
2021-12-31 13:10:20 +01:00
|
|
|
use CuyZ\Valinor\Mapper\Tree\Message\HasCode;
|
2021-11-28 17:43:02 +01:00
|
|
|
use CuyZ\Valinor\Mapper\Tree\Message\Message;
|
|
|
|
|
2021-12-31 13:10:20 +01:00
|
|
|
final class FakeMessage implements Message, HasCode
|
2021-11-28 17:43:02 +01:00
|
|
|
{
|
2021-12-31 13:10:20 +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
|
|
|
|
{
|
2021-12-31 13:10:20 +01:00
|
|
|
return $this->message;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function code(): string
|
|
|
|
{
|
|
|
|
return 'some_code';
|
2021-11-28 17:43:02 +01:00
|
|
|
}
|
|
|
|
}
|