mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-06-25 02:33:36 +02:00
fixed return type of RendererInterface
This commit is contained in:
@ -10,17 +10,15 @@ class RenderInXml extends Decorator
|
||||
/**
|
||||
* render data as XML.
|
||||
*
|
||||
* @return mixed|string
|
||||
* @return string
|
||||
*/
|
||||
public function renderData()
|
||||
{
|
||||
$output = $this->wrapped->renderData();
|
||||
|
||||
// do some fancy conversion to xml from array ...
|
||||
|
||||
$doc = new \DOMDocument();
|
||||
|
||||
foreach ($output as $key => $val) {
|
||||
foreach ($this->wrapped->renderData() as $key => $val) {
|
||||
$doc->appendChild($doc->createElement($key, $val));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user