Files
newznab-tmux/app/Services/Categorization/Categorizers/AbstractCategorizer.php
T
DariusIII 0c6ce9974a CS fixes
2026-01-07 14:51:28 +01:00

33 lines
856 B
PHP

<?php
namespace App\Services\Categorization\Categorizers;
use App\Services\Categorization\CategorizationResult;
use App\Services\Categorization\Contracts\CategorizerInterface;
use App\Services\Categorization\ReleaseContext;
abstract class AbstractCategorizer implements CategorizerInterface
{
protected int $priority = 50;
public function getPriority(): int
{
return $this->priority;
}
public function shouldSkip(ReleaseContext $context): bool
{
return false;
}
protected function matched(int $categoryId, float $confidence, string $matchedBy, array $debug = []): CategorizationResult
{
return new CategorizationResult($categoryId, $confidence, $matchedBy, $debug);
}
protected function noMatch(): CategorizationResult
{
return CategorizationResult::noMatch();
}
}