Skip to content

fix: OptionおよびResultインターフェースからphpstanアサーションを削除 #44

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

Merged
merged 1 commit into from
May 20, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions src/Option.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public function isNone(): bool;
* @see https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some_and
*
* @param Closure(T): bool $predicate
* @phpstan-assert-if-true Some<T> $this
* @phpstan-assert-if-false None $this
*/
public function isSomeAnd(Closure $predicate): bool;

Expand Down
4 changes: 0 additions & 4 deletions src/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,12 @@ public function isErr(): bool;
/**
* @see https://doc.rust-lang.org/std/result/enum.Result.html#method.is_ok_and
* @param Closure(T): bool $predicate
* @phpstan-assert-if-true Ok<T> $this
* @phpstan-assert-if-false Err<E> $this
*/
public function isOkAnd(Closure $predicate): bool;

/**
* @see https://doc.rust-lang.org/std/result/enum.Result.html#method.is_err_and
* @param Closure(E): bool $predicate
* @phpstan-assert-if-true Err<E> $this
* @phpstan-assert-if-false Ok<T> $this
*/
public function isErrAnd(Closure $predicate): bool;

Expand Down
Loading