File: /var/www/vhosts/creativefellows.nl/fvr.creativefellows.nl/src/Action/Review/ReviewAction.php
<?php
namespace App\Action\Review;
use App\Action\Action;
use App\Domain\Reviews\Service\ReviewReader;
use Psr\Http\Message\ResponseInterface;
use Psr\Container\ContainerInterface;
final class ReviewAction extends Action
{
protected $container;
protected $reviews;
public function __construct(
ContainerInterface $container,
ReviewReader $reviews
) {
$this->container = $container;
$this->reviews = $reviews;
}
public function action() : ResponseInterface
{
$reviews = $this->reviews->get(5);
return $this->respond($reviews);
}
}