<?php

namespace App\Modules\Rides\Services;

use App\Modules\Rides\Repositories\RideRepository;

class RideService
{
    private RideRepository $repository;

    public function __construct()
    {
        $this->repository = new RideRepository();
    }

    public function getAllRides(): array
    {
        return $this->repository->all();
    }
    public function getPopularRides(): array
    {
        return $this->repository->popular();
    }
    public function getDriverById(int $id): array|false
    {
        return $this->repository->findDriverById($id);
    }
}