check($company, $description)->classification === PressReleaseClassification::Red; } public function check(Company $company, string $description): ClassificationResult { $proposed = new PressRelease([ 'title' => (string) $company->name, 'text' => $description, ]); try { return $this->classification->driver()->classify($proposed); } catch (\Throwable $e) { Log::channel('ki')->warning('Profilprüfung (Rot-Ebene) fehlgeschlagen — deterministischer Fallback.', [ 'company_id' => $company->getKey(), 'error' => $e->getMessage(), ]); return $this->classification->driver('deterministic')->classify($proposed); } } }