18 lines
360 B
PHP
18 lines
360 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Esun\CustomerCoupon\Model\Coupon;
|
|
|
|
use Magento\SalesRule\Model\Rule;
|
|
|
|
class ConditionFormatter
|
|
{
|
|
/** @return string[] */
|
|
public function format(Rule $rule): array
|
|
{
|
|
$description = trim(strip_tags((string)$rule->getDescription()));
|
|
|
|
return $description === '' ? [] : [$description];
|
|
}
|
|
}
|