File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,5 +51,5 @@ interface FormatterInterface
5151 *
5252 * @return mixed
5353 */
54- public function format (array $ data );
54+ public function format ($ data );
5555}
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ class JSONFormatter implements FormatterInterface
5151 *
5252 * @param $data
5353 *
54- * @return mixed
54+ * @return string|bool (JSON string | false)
5555 */
56- public function format (array $ data )
56+ public function format ($ data )
5757 {
5858 $ options = JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ;
5959
Original file line number Diff line number Diff line change @@ -50,9 +50,9 @@ class XMLFormatter implements FormatterInterface
5050 *
5151 * @param $data
5252 *
53- * @return mixed
53+ * @return string|bool (XML string | false)
5454 */
55- public function format (array $ data )
55+ public function format ($ data )
5656 {
5757 // SimpleXML is installed but default
5858 // but best to check, and then provide a fallback.
@@ -66,7 +66,7 @@ public function format(array $data)
6666
6767 $ output = new \SimpleXMLElement ('<?xml version="1.0"?><response></response> ' );
6868
69- $ this ->arrayToXML ($ data , $ output );
69+ $ this ->arrayToXML (( array ) $ data , $ output );
7070
7171 return $ output ->asXML ();
7272 }
You can’t perform that action at this time.
0 commit comments