Skip to content

Commit ca38cd7

Browse files
committed
allow non-pure callables again
1 parent f7230a3 commit ca38cd7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

psalm.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616
<plugins>
1717
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
1818
</plugins>
19+
20+
<issueHandlers>
21+
<ImpureFunctionCall errorLevel="info"/>
22+
</issueHandlers>
1923
</psalm>

src/ResultInterface.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface ResultInterface
2020
*
2121
* @template TNewSuccess
2222
*
23-
* @param pure-callable(TSuccess):TNewSuccess $map
23+
* @param callable(TSuccess):TNewSuccess $map
2424
* @return self<TNewSuccess, TError>
2525
*/
2626
public function map(callable $map): self;
@@ -34,7 +34,7 @@ public function map(callable $map): self;
3434
3535
* @template TNewError
3636
*
37-
* @param pure-callable(TError):TNewError $map
37+
* @param callable(TError):TNewError $map
3838
* @return self<TSuccess, TNewError>
3939
*/
4040
public function mapError(callable $map): self;
@@ -47,7 +47,7 @@ public function mapError(callable $map): self;
4747
* @template TNewSuccess
4848
* @template TNewError
4949
*
50-
* @param pure-callable(TSuccess):self<TNewSuccess, TNewError> $map
50+
* @param callable(TSuccess):self<TNewSuccess, TNewError> $map
5151
* @return self<TNewSuccess, TError|TNewError>
5252
*/
5353
public function chain(callable $map): self;
@@ -68,7 +68,7 @@ public function get();
6868
*
6969
* @template TNewError
7070
*
71-
* @param pure-callable(TError):TNewError $map
71+
* @param callable(TError):TNewError $map
7272
* @return TSuccess|TNewError
7373
*/
7474
public function getOr(callable $map);

0 commit comments

Comments
 (0)