Skip to content

Commit f4dd673

Browse files
committed
Move abstract fromXML to the proper place
1 parent fd65ab7 commit f4dd673

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/AbstractElement.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,4 @@ public function isEmptyElement(): bool
250250
{
251251
return false;
252252
}
253-
254-
255-
/**
256-
* Create a class from XML
257-
*
258-
* @param \DOMElement $xml
259-
* @return static
260-
*/
261-
abstract public static function fromXML(DOMElement $xml): static;
262253
}

src/SerializableElementTrait.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,14 @@ public function toArray(): array
112112
* @return \DOMElement
113113
*/
114114
abstract public function toXML(DOMElement $parent = null): DOMElement;
115+
116+
117+
/**
118+
* Create a class from XML
119+
*
120+
* @param \DOMElement $xml
121+
* @return static
122+
* @psalm-suppress MethodSignatureMismatch
123+
*/
124+
abstract public static function fromXML(DOMElement $xml): static;
115125
}

0 commit comments

Comments
 (0)