package and depencies
This commit is contained in:
@@ -18,8 +18,8 @@ use Symfony\Component\Mime\RawMessage;
|
||||
|
||||
final class EmailAddressContains extends Constraint
|
||||
{
|
||||
private $headerName;
|
||||
private $expectedValue;
|
||||
private string $headerName;
|
||||
private string $expectedValue;
|
||||
|
||||
public function __construct(string $headerName, string $expectedValue)
|
||||
{
|
||||
@@ -27,9 +27,6 @@ final class EmailAddressContains extends Constraint
|
||||
$this->expectedValue = $expectedValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function toString(): string
|
||||
{
|
||||
return sprintf('contains address "%s" with value "%s"', $this->headerName, $this->expectedValue);
|
||||
@@ -37,12 +34,10 @@ final class EmailAddressContains extends Constraint
|
||||
|
||||
/**
|
||||
* @param RawMessage $message
|
||||
*
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function matches($message): bool
|
||||
{
|
||||
if (RawMessage::class === \get_class($message)) {
|
||||
if (RawMessage::class === $message::class) {
|
||||
throw new \LogicException('Unable to test a message address on a RawMessage instance.');
|
||||
}
|
||||
|
||||
@@ -64,8 +59,6 @@ final class EmailAddressContains extends Constraint
|
||||
|
||||
/**
|
||||
* @param RawMessage $message
|
||||
*
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function failureDescription($message): string
|
||||
{
|
||||
|
Reference in New Issue
Block a user