Files
piratepoet/mailpoet/lib/Automation/Engine/Integration/SubjectTransformer.php
David Remer 53f3a5d001 Allow to return null in SubjectTransformer::transform()
Sometimes a transformer can't return a subject. In this case transform() will return null
instead of throwing an exception. This means an automation can run until it comes to a
step where the subject would be needed. There it would fail.

[PREMIUM-248]
2023-10-30 21:22:23 +01:00

14 lines
294 B
PHP

<?php declare(strict_types = 1);
namespace MailPoet\Automation\Engine\Integration;
use MailPoet\Automation\Engine\Data\Subject;
interface SubjectTransformer {
public function transform(Subject $data): ?Subject;
public function returns(): string;
public function accepts(): string;
}