Skip to content

Commit

Permalink
fix psalm issues
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosh committed Oct 21, 2021
1 parent b92296e commit 7b2fc26
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Instances/Identity/IdentityApply.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function map(callable $f, $a): Identity
* @param HK1<IdentityBrand, A> $a
* @return Identity<B>
*
* @psalm-pure
* @psalm-mutation-free
*
* @psalm-suppress LessSpecificImplementedReturnType
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Instances/Identity/IdentityFunctor.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class IdentityFunctor implements Functor
* @param HK1<IdentityBrand, A> $a
* @return Identity<B>
*
* @psalm-pure
* @psalm-mutation-free
*
* @psalm-suppress LessSpecificImplementedReturnType
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Instances/Identity/IdentityMonad.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function pure($a): Identity
* @param callable(A): HK1<IdentityBrand, B> $f
* @return Identity<B>
*
* @psalm-pure
* @psalm-mutation-free
*
* @psalm-suppress LessSpecificImplementedReturnType
*/
Expand Down
3 changes: 1 addition & 2 deletions src/Instances/Identity/IdentityTraversable.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,13 @@ public function foldr(callable $f, $b, HK1 $a)
* @param HK1<IdentityBrand, A> $a
* @return HK1<F, Identity<B>>
*
* @psalm-suppress ImplementedReturnTypeMismatch
* @psalm-suppress InvalidArgument
* @psalm-suppress LessSpecificImplementedReturnType
*/
public function traverse(Applicative $applicative, callable $f, HK1 $a): HK1
{
$identityA = Identity::fromBrand($a);

/** @psalm-suppress InvalidArgument */
return $applicative->map([Identity::class, 'wrap'], $f($identityA->unwrap()));
}
}

0 comments on commit 7b2fc26

Please sign in to comment.