2025-12-14 23:10:01 +00:00
|
|
|
<?php
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace Phred\Http\Controllers;
|
|
|
|
|
|
2025-12-23 23:40:02 +00:00
|
|
|
use Phred\Http\Contracts\ApiResponseFactoryInterface;
|
2025-12-14 23:10:01 +00:00
|
|
|
use Psr\Http\Message\ResponseInterface;
|
|
|
|
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
|
|
|
|
|
|
|
|
|
final class HealthController
|
|
|
|
|
{
|
2025-12-23 23:40:02 +00:00
|
|
|
public function __construct(private ApiResponseFactoryInterface $factory) {}
|
|
|
|
|
|
2025-12-14 23:10:01 +00:00
|
|
|
public function __invoke(Request $request): ResponseInterface
|
|
|
|
|
{
|
2025-12-23 23:40:02 +00:00
|
|
|
return $this->factory->ok([
|
2025-12-14 23:10:01 +00:00
|
|
|
'ok' => true,
|
|
|
|
|
'framework' => 'Phred',
|
2025-12-23 23:40:02 +00:00
|
|
|
]);
|
2025-12-14 23:10:01 +00:00
|
|
|
}
|
|
|
|
|
}
|