Skip to content

Fix SimpleXMLElement::offsetSet #4196

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

Open
wants to merge 1 commit into
base: 2.1.x
Choose a base branch
from

Conversation

VincentLanglet
Copy link
Contributor

@@ -99,6 +99,13 @@ class SimpleXMLElement implements Traversable, ArrayAccess, Iterator, RecursiveI
*/
public function saveXML(?string $filename = null) { }

/**
* @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(),
);
}

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
1 participant