1 | <?php |
||
12 | class XmlResponse extends Response |
||
13 | { |
||
14 | |||
15 | /** @var array */ |
||
16 | protected $content = []; |
||
17 | |||
18 | /** |
||
19 | * @param array $data |
||
20 | * @param \SimpleXMLElement $xml |
||
21 | * @codeCoverageIgnore |
||
22 | */ |
||
23 | private function convertArrayToXml(\SimpleXMLElement &$xml, $data) |
||
42 | |||
43 | /** |
||
44 | * @param \SimpleXMLElement $xml |
||
45 | * @param string $key |
||
46 | * @param null|array $value |
||
47 | * @return null|\SimpleXMLElement |
||
48 | * @codeCoverageIgnore |
||
49 | */ |
||
50 | private function generateNode(\SimpleXMLElement &$xml, $key, $value = null) |
||
72 | |||
73 | /** |
||
74 | * @param array $content |
||
75 | * @return self |
||
76 | * @codeCoverageIgnore |
||
77 | */ |
||
78 | public function setContent($content = []) |
||
89 | |||
90 | } |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: