Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 083e425

Browse files
union and intersection
1 parent d843b7b commit 083e425

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

‎src/Reflection/Type/IntersectionTypeMethodReflection.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,4 +228,9 @@ public function getAttributes(): array
228228
return $this->methods[0]->getAttributes();
229229
}
230230

231+
public function hasNoDiscardAttribute(): TrinaryLogic
232+
{
233+
return TrinaryLogic::lazyMaxMin($this->methods, static fn (ExtendedMethodReflection $method): TrinaryLogic => $method->hasNoDiscardAttribute());
234+
}
235+
231236
}

‎src/Reflection/Type/UnionTypeMethodReflection.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,8 @@ public function getAttributes(): array
205205
return $this->methods[0]->getAttributes();
206206
}
207207

208+
public function hasNoDiscardAttribute(): TrinaryLogic
209+
{
210+
return TrinaryLogic::lazyExtremeIdentity($this->methods, static fn (ExtendedMethodReflection $method): TrinaryLogic => $method->hasNoDiscardAttribute());
211+
}
208212
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /