Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Feb 6, 2020
1 parent a5e63f6 commit 2a87f46
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
5 changes: 5 additions & 0 deletions tests/src/BadCombinator.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

use loophp\combinator\Combinator;

/**
* Class BadCombinator.
*
* @psalm-immutable
*/
class BadCombinator extends Combinator
{
}
2 changes: 1 addition & 1 deletion tests/static-analysis/A.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/**
* @param callable(int): string $f
* @param string $x
* @param int $x
*
* @return string
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/static-analysis/K.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @param string $x
* @param int $y
*
* @return int
* @return string
*/
function test($x, $y)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/static-analysis/U.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use loophp\combinator\Combinator\U as Combinator;

/**
* @param callable(int): mixed $f
* @param callable(callable):callable $f
* @param callable(int): mixed $g
*
* @return mixed
Expand Down
7 changes: 4 additions & 3 deletions tests/static-analysis/Y.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

namespace loophp\combinator\Tests\StaticAnalysis;

use Closure;
use loophp\combinator\Combinator\Y as Combinator;

/**
* @param callable(int): callable $f
* @param callable(callable): Closure $f
*
* @return callable
* @return Closure
*/
function test(callable $f)
function test(callable $f): Closure
{
return (new Combinator($f))();
}
7 changes: 4 additions & 3 deletions tests/static-analysis/Z.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@

namespace loophp\combinator\Tests\StaticAnalysis;

use Closure;
use loophp\combinator\Combinator\Z as Combinator;

/**
* @param callable(int): callable $f
* @param callable(callable): Closure $f
*
* @return callable
* @return Closure
*/
function test(callable $f)
function test(callable $f): Closure
{
return (new Combinator($f))();
}

0 comments on commit 2a87f46

Please sign in to comment.