Skip to content

Commit

Permalink
Add void return type of xmlSerialize
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Jan 22, 2023
1 parent 5c59868 commit 10cce63
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Component.php
Expand Up @@ -368,7 +368,7 @@ public function jsonSerialize()
*
* @param Xml\Writer $writer XML writer
*/
public function xmlSerialize(Xml\Writer $writer)
public function xmlSerialize(Xml\Writer $writer): void
{
$components = [];
$properties = [];
Expand Down
2 changes: 1 addition & 1 deletion lib/Component/VCard.php
Expand Up @@ -473,7 +473,7 @@ public function jsonSerialize()
*
* @param Xml\Writer $writer XML writer
*/
public function xmlSerialize(Xml\Writer $writer)
public function xmlSerialize(Xml\Writer $writer): void
{
$propertiesByGroup = [];

Expand Down
2 changes: 1 addition & 1 deletion lib/Node.php
Expand Up @@ -82,7 +82,7 @@ abstract public function jsonSerialize();
*
* @param Xml\Writer $writer XML writer
*/
abstract public function xmlSerialize(Xml\Writer $writer);
abstract public function xmlSerialize(Xml\Writer $writer): void;

/**
* Call this method on a document if you're done using it.
Expand Down
2 changes: 1 addition & 1 deletion lib/Parameter.php
Expand Up @@ -334,7 +334,7 @@ public function jsonSerialize()
*
* @param Xml\Writer $writer XML writer
*/
public function xmlSerialize(Xml\Writer $writer)
public function xmlSerialize(Xml\Writer $writer): void
{
foreach (explode(',', $this->value) as $value) {
$writer->writeElement('text', $value);
Expand Down
2 changes: 1 addition & 1 deletion lib/Property.php
Expand Up @@ -318,7 +318,7 @@ public function setXmlValue(array $value)
*
* @param Xml\Writer $writer XML writer
*/
public function xmlSerialize(Xml\Writer $writer)
public function xmlSerialize(Xml\Writer $writer): void
{
$parameters = [];

Expand Down

0 comments on commit 10cce63

Please sign in to comment.