Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: relax callable typehints to not require pure #563

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/MapperBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __construct()
* ```
*
* @param interface-string|class-string $name
* @psalm-param pure-callable $callback
* @param callable $callback
*/
public function infer(string $name, callable $callback): self
{
Expand Down Expand Up @@ -200,7 +200,6 @@ public function infer(string $name, callable $callback): self
* ]);
* ```
*
* @psalm-param pure-callable|class-string ...$constructors
* @param callable|class-string ...$constructors
*/
public function registerConstructor(callable|string ...$constructors): self
Expand Down Expand Up @@ -298,7 +297,6 @@ public function withCache(CacheInterface $cache): self

/**
* @template T
* @psalm-param pure-callable(T): T $callback
* @param callable(T): T $callback
*/
public function alter(callable $callback): self
Expand Down Expand Up @@ -446,7 +444,6 @@ public function allowPermissiveTypes(): self
* ]);
* ```
*
* @psalm-param pure-callable(Throwable): ErrorMessage $filter
* @param callable(Throwable): ErrorMessage $filter
*/
public function filterExceptions(callable $filter): self
Expand Down Expand Up @@ -514,7 +511,6 @@ public function filterExceptions(callable $filter): self
* ->normalize('Hello world'); // HELLO WORLD?!
* ```
*
* @psalm-param pure-callable|class-string $transformer
* @param callable|class-string $transformer
*/
public function registerTransformer(callable|string $transformer, int $priority = 0): self
Expand Down
Loading