Skip to content

Commit

Permalink
Improve and fix the generic types for the ResultMockFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Jun 22, 2023
1 parent 2ccb286 commit b2f1017
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Core/src/Test/ResultMockFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ class ResultMockFactory
* ResultMockFactory::createFailing(SendEmailResponse::class, 400, 'invalid value');
* </code>
*
* @template T
* @template T of Result
*
* @psalm-param class-string<T> $class
*
* @return Result|T
* @return T
*/
public static function createFailing(
string $class,
Expand Down Expand Up @@ -61,11 +61,11 @@ public static function createFailing(
* ResultMockFactory::create(SendEmailResponse::class, ['MessageId'=>'foo123']);
* </code>
*
* @template T
* @template T of Result
*
* @psalm-param class-string<T> $class
*
* @return Result|T
* @return T
*/
public static function create(string $class, array $data = [])
{
Expand Down Expand Up @@ -124,11 +124,11 @@ public static function create(string $class, array $data = [])
/**
* Instantiate a Waiter class with a final state.
*
* @template T
* @template T of Waiter
*
* @psalm-param class-string<T> $class
*
* @return Result|T
* @return T
*/
public static function waiter(string $class, string $finalState)
{
Expand Down

0 comments on commit b2f1017

Please sign in to comment.