mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
feature: add Union#allFloatLiterals
as it was missing
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This commit is contained in:
parent
e13268f5c0
commit
4068f5cbb0
@ -1267,6 +1267,17 @@ final class Union implements TypeNode
|
||||
return true;
|
||||
}
|
||||
|
||||
public function allFloatLiterals(): bool
|
||||
{
|
||||
foreach ($this->types as $atomic_key_type) {
|
||||
if (!$atomic_key_type instanceof TLiteralFloat) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function allLiterals(): bool
|
||||
{
|
||||
foreach ($this->types as $atomic_key_type) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user