We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 10fcbe9d authored by Evan Prodromou's avatar Evan Prodromou

Make XMLOutputter work with phpcs

A couple of small changes to comply with code standards.

Also, note that the second param of element() and elementStart() can
be a string.
parent bbb32dd2
......@@ -63,8 +63,8 @@ class XMLOutputter
*
* Initializes the wrapped XMLWriter.
*
* @param $output URL for outputting, defaults to stdout
* @param $indent Whether to indent output, default true
* @param string $output URL for outputting, defaults to stdout
* @param boolean $indent Whether to indent output, default true
*/
function __construct($output='php://output', $indent=true)
......@@ -119,6 +119,9 @@ class XMLOutputter
* raw output, use elementStart() and elementEnd() with a call
* to raw() in the middle.
*
* If $attrs is a string instead of an array, it will be treated
* as the class attribute of the element.
*
* @param string $tag Element type or tagname
* @param array $attrs Array of element attributes, as
* key-value pairs
......@@ -142,6 +145,9 @@ class XMLOutputter
* Mostly used for when an element has content that's
* not a simple string.
*
* If $attrs is a string instead of an array, it will be treated
* as the class attribute of the element.
*
* @param string $tag Element type or tagname
* @param array $attrs Array of element attributes
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment