. */ namespace App\Services\LogSystem; use App\Settings\SystemSettings\HistorySettings; /** * This service is used to check if a log change comment is needed for a given operation type. * It is configured using the "enforce_change_comments_for" config parameter. * @see \App\Tests\Services\LogSystem\EventCommentNeededHelperTest */ final class EventCommentNeededHelper { public function __construct(private readonly HistorySettings $settings) { } /** * Checks if a log change comment is needed for the given operation type */ public function isCommentNeeded(EventCommentType $comment_type): bool { return in_array($comment_type, $this->settings->enforceComments, true); } }