<?php
declare(strict_types=1);
namespace Services;

use Repositories\CategoryRepository;

final class CategoryService
{
    public function __construct(private ?CategoryRepository $repo = null) { $this->repo ??= new CategoryRepository(); }
    public function list(): array { return $this->repo->all(); }
    public function find(string $slug): ?array { return $this->repo->findBySlug($slug); }
}
