-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add xmlStandalone property to XmlWriter, includes a test and documentation #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you for adding this! Just one tiny change please!
src/XmlWriter.php
Outdated
/** | ||
* Set the XML standalone | ||
*/ | ||
public function setXmlStandalone(bool $xmlStandalone): XmlWriter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public function setXmlStandalone(bool $xmlStandalone): XmlWriter | |
public function setXmlStandalone(bool $xmlStandalone): static |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would you like setXmlEncoding
and setXmlVersion
also marked with static for the return type? They are currently XmlWriter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change made, also made the change for setXmlEncoding
and setXmlVersion
. It just makes sense to do :) Let me know if you think otherwise
Don't worry if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome thank you @jbraband for also updating my code
Spatie's spatie/array-to-xml package exposes a parameter to set the XML standalone attribute in the declaration.
This pull request adds that to saloonphp/xml-wrangler. The implementation mirrors the existing API for XmlEncoding and XmlVersion.