Skip to content

Conversation

VincentLanglet
Copy link
Contributor


/**
* @param int|string $key
* @param self|string|int|float|bool $value
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept consistency with

public function getWritableType(): Type
{
return TypeCombinator::union(
$this->type,
new IntegerType(),
new FloatType(),
new StringType(),
new BooleanType(),
);
}

@ondrejmirtes ondrejmirtes merged commit 1ac1259 into phpstan:2.1.x Sep 2, 2025
449 of 454 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SimpleXMLElement Should Accept String

2 participants