This commit is contained in:
2020-10-29 18:17:25 +08:00
parent 6839b64be8
commit 53ae43b79b
198 changed files with 708 additions and 850 deletions
+5 -5
View File
@@ -5,7 +5,7 @@
* Date: 2018/4/8 0008
* Time: 17:29
*/
declare(strict_types=1);
namespace HttpServer\Http\Formatter;
@@ -22,12 +22,12 @@ use HttpServer\IInterface\IFormatter;
class XmlFormatter extends Application implements IFormatter
{
public $data = '';
public ?string $data = '';
/** @var Response */
public $status;
public Response $status;
public $header = [];
public array $header = [];
/**
* @param $data
@@ -61,7 +61,7 @@ class XmlFormatter extends Application implements IFormatter
* @param SimpleXMLElement $dom
* @param $data
*/
public function toXml($dom, $data)
public function toXml(SimpleXMLElement $dom, $data)
{
foreach ($data as $key => $val) {
if (is_numeric($key)) {