chore: adds doc blocks to Search module

This commit is contained in:
2025-04-25 15:23:04 -05:00
parent 6a2567bf98
commit 7270fa2936
8 changed files with 9 additions and 10 deletions

View File

@@ -4,9 +4,9 @@ namespace App\Search\Action\Command;
use OneToMany\RichBundle\Contract\CommandInterface;
/** @implements CommandInterface<GetMediaInfoCommand> */
class GetMediaInfoCommand implements CommandInterface
{
/** @implements CommandInterface<GetMediaInfoCommand> */
public function __construct(
public string $tmdbId,
public string $mediaType,

View File

@@ -4,12 +4,9 @@ namespace App\Search\Action\Command;
use OneToMany\RichBundle\Contract\CommandInterface;
/** @implements CommandInterface<SearchCommand> */
class SearchCommand implements CommandInterface
{
/**
* @param string $term
* @implements CommandInterface<SearchCommand>
*/
public function __construct(
public string $term
) {}

View File

@@ -2,12 +2,14 @@
namespace App\Search\Action\Handler;
use App\Search\Action\Command\GetMediaInfoCommand;
use App\Search\Action\Result\GetMediaInfoResult;
use App\Tmdb\Tmdb;
use OneToMany\RichBundle\Contract\CommandInterface;
use OneToMany\RichBundle\Contract\HandlerInterface;
use OneToMany\RichBundle\Contract\ResultInterface;
/** @implements HandlerInterface<GetMediaInfoCommand, GetMediaInfoResult> */
class GetMediaInfoHandler implements HandlerInterface
{
public function __construct(

View File

@@ -8,13 +8,13 @@ use OneToMany\RichBundle\Contract\CommandInterface;
use OneToMany\RichBundle\Contract\HandlerInterface;
use OneToMany\RichBundle\Contract\ResultInterface;
/*** @implements HandlerInterface<SearchResult> */
class SearchHandler implements HandlerInterface
{
public function __construct(
private Tmdb $tmdb,
) {}
/*** @implements HandlerInterface<SearchResult> */
public function handle(CommandInterface $command): ResultInterface
{
return new SearchResult(

View File

@@ -8,6 +8,7 @@ use OneToMany\RichBundle\Attribute\SourceRoute;
use OneToMany\RichBundle\Contract\CommandInterface;
use OneToMany\RichBundle\Contract\InputInterface;
/** @implements InputInterface<GetMediaInfoInput> */
class GetMediaInfoInput implements InputInterface
{
public function __construct(

View File

@@ -8,9 +8,7 @@ use OneToMany\RichBundle\Attribute\SourceRequest;
use OneToMany\RichBundle\Contract\CommandInterface;
use OneToMany\RichBundle\Contract\InputInterface;
/**
* @implements InputInterface<SearchCommand>
*/
/** @implements InputInterface<SearchCommand> */
class SearchInput implements InputInterface
{
public function __construct(

View File

@@ -5,9 +5,9 @@ namespace App\Search\Action\Result;
use App\Tmdb\TmdbResult;
use OneToMany\RichBundle\Contract\ResultInterface;
/** @implements ResultInterface<GetMediaInfoResult> */
class GetMediaInfoResult implements ResultInterface
{
/** @implements ResultInterface<GetMediaInfoResult> */
public function __construct(
public TmdbResult $media,
) {}

View File

@@ -4,6 +4,7 @@ namespace App\Search\Action\Result;
use OneToMany\RichBundle\Contract\ResultInterface;
/** @implements ResultInterface<SearchResult> */
class SearchResult implements ResultInterface
{
public function __construct(