Skip to content

Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️

663 B
Raw Blame
<?php

namespace HiEvents\Services\Domain\Event\DTO;

use HiEvents\DataTransferObjects\BaseDataObject;

class EventSpamCheckResultDTO extends BaseDataObject
{
    /**
     * @param  string[]  $reasons
     */
    public function __construct(
        public readonly bool $isSpam,
        public readonly float $confidence,
        public readonly array $reasons,
        public readonly string $model,
    ) {}

    public function toVerdictArray(): array
    {
        return [
            'is_spam' => $this->isSpam,
            'confidence' => $this->confidence,
            'reasons' => $this->reasons,
            'model' => $this->model,
        ];
    }
}