trypost/app/Enums/Ai/GeneratorFormat.php
Paulo Castellano 9f5bacc03f refactor(ai): introduce GeneratorFormat enum and drop stringly-typed format
Replace the 'single'/'carousel' string format threaded through the AI
generation path with a typed GeneratorFormat enum (PostContentGenerator,
PostContentHumanizer, PostContentStreamer, StreamPostCreation,
RunGenerateNode, deriveFormat).

Remove generatorFormat() from AiContentTemplate and the three templates —
it conflated style and format (returning 'tweet_card'). The tweet-card
check now lives on ContentStyle via isTweetCard(), and the humanizer skip
on ContentStyle::humanizes(), so the style declares its own behaviour
instead of callers comparing magic strings.
2026-06-18 11:11:23 -03:00

16 lines
244 B
PHP

<?php
declare(strict_types=1);
namespace App\Enums\Ai;
enum GeneratorFormat: string
{
case Single = 'single';
case Carousel = 'carousel';
public function isCarousel(): bool
{
return $this === self::Carousel;
}
}