Permalink
Browse files

Fixing up some formatting issues with the new coding standard.

  • Loading branch information...
1 parent 13f23a8 commit 8371313985c9574b6045f5babc4fb067f13733a1 @LouisLandry LouisLandry committed Jul 26, 2011
View
2 build.xml
@@ -81,7 +81,7 @@
<exec executable="phpcs">
<arg value="--report=checkstyle" />
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
- <arg value="--standard=${basedir}/build/phpcs/Joomla" />
+ <arg value="--standard=Joomla" />
<arg path="${source}/joomla" />
</exec>
</target>
View
2 build/phpcs/Joomla/ruleset.xml
@@ -13,7 +13,7 @@
<!-- Lines can be 85 chars long, but never show errors -->
<rule ref="Joomla.Files.LineLength">
<properties>
- <property name="lineLimit" value="130"/>
+ <property name="lineLimit" value="150"/>
<property name="absoluteLineLimit" value="0"/>
</properties>
</rule>
View
4 libraries/joomla/application/cli.php
@@ -87,6 +87,8 @@ protected function __construct()
*
* This method must be invoked as: $cli = JCli::getInstance();
*
+ * @param string $name The name of the JCli class to instantiate.
+ *
* @return JCli A JCli object
*
* @since 11.1
@@ -259,7 +261,7 @@ protected function fetchConfigurationData()
if (!is_file($file)) {
return false;
}
- require_once $file;
+ include_once $file;
// Instantiate the configuration object.
if (!class_exists('JConfig')) {
View
11 libraries/joomla/application/cli/daemon.php
@@ -18,17 +18,16 @@
*
* @package Joomla.Platform
* @subpackage Application
- * @since 11.1
- *
* @see http://www.php.net/manual/en/book.pcntl.php
* @see http://php.net/manual/en/features.commandline.php
+ * @since 11.1
*/
class JDaemon extends JCli
{
/**
* @var array The available POSIX signals to be caught by default.
- * @since 11.1
* @see http://php.net/manual/pcntl.constants.php
+ * @since 11.1
*/
protected static $signals = array(
SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGIOT, SIGBUS, SIGFPE, SIGUSR1,
@@ -430,10 +429,12 @@ protected function daemonize()
$this->running = false;
// Fork process!
- try {
+ try
+ {
$this->fork();
}
- catch (ApplicationException $e) {
+ catch (ApplicationException $e)
+ {
JLog::add('Unable to fork.', JLog::EMERGENCY);
return false;
}
View
9 libraries/joomla/application/input.php
@@ -87,7 +87,7 @@ public function __construct($source = null, $options = array())
/**
* Magic method to get an input object
*
- * @param mixed $name Name of the input object to retrieve.
+ * @param mixed $name Name of the input object to retrieve.
*
* @return JInput The request input object
*
@@ -185,8 +185,8 @@ public function set($name, $value)
/**
* Magic method to get filtered input data.
*
- * @param mixed $name Name of the value to get.
- * @param string $default Default value to return if variable does not exist.
+ * @param mixed $name Name of the value to get.
+ * @param string $arguments Default value to return if variable does not exist.
*
* @return boolean The filtered boolean input value.
*
@@ -210,6 +210,9 @@ public function __call($name, $arguments)
/**
* Gets the request method.
*
+ * @param mixed $name Name of the value to get.
+ * @param string $arguments Default value to return if variable does not exist.
+ *
* @return string The request method.
*
* @since 11.1
View
14 libraries/joomla/application/input/files.php
@@ -21,7 +21,7 @@
class JInputFiles extends JInput
{
- protected $_decodedData = array();
+ protected $decodedData = array();
/**
* Gets a value from the input data.
@@ -53,12 +53,22 @@ public function get($name, $default = null, $filter = 'cmd')
}
+ /**
+ * Method to decode a data array.
+ *
+ * @param array $data The data array to decode.
+ *
+ * @return array
+ *
+ * @since 11.1
+ */
protected function decodeData($data)
{
$result = array();
if (is_array($data[0])) {
- foreach ($data[0] AS $k => $v) {
+ foreach ($data[0] AS $k => $v)
+ {
$result[$k] = $this->decodeData(array($data[0][$k], $data[1][$k], $data[2][$k], $data[3][$k], $data[4][$k]));
}
return $result;
View
8 libraries/joomla/log/logentry.php
@@ -49,7 +49,7 @@ class JLogEntry
* The priority of the message to be logged.
* @var string
* @since 11.1
- * @see $_priorities
+ * @see $priorities
*/
public $priority = JLog::INFO;
@@ -58,7 +58,7 @@ class JLogEntry
* @var array
* @since 11.1
*/
- protected $_priorities = array(
+ protected $priorities = array(
JLog::EMERGENCY,
JLog::ALERT,
JLog::CRITICAL,
@@ -73,7 +73,7 @@ class JLogEntry
* Constructor
*
* @param string $message The message to log.
- * @param string $priority Message priority based on {$this->_priorities}.
+ * @param string $priority Message priority based on {$this->priorities}.
* @param string $category Type of entry
* @param string $date Date of entry (defaults to now if not specified or blank)
*
@@ -86,7 +86,7 @@ public function __construct($message, $priority = JLog::INFO, $category = '', $d
$this->message = (string) $message;
// Sanitize the priority.
- if (!in_array($priority, $this->_priorities, true)) {
+ if (!in_array($priority, $this->priorities, true)) {
$priority = JLog::INFO;
}
$this->priority = $priority;
View
6 libraries/joomla/log/logger.php
@@ -33,13 +33,13 @@
/**
* Constructor.
*
- * @param array $options Log object options.
+ * @param array &$options Log object options.
*
* @return void
*
* @since 11.1
*/
- public function __construct(array & $options)
+ public function __construct(array &$options)
{
// Set the options for the class.
$this->options = & $options;
@@ -48,7 +48,7 @@ public function __construct(array & $options)
/**
* Method to add an entry to the log.
*
- * @param JLogEntry The log entry object to add to the log.
+ * @param JLogEntry $entry The log entry object to add to the log.
*
* @return void
*
View
12 libraries/joomla/log/loggers/database.php
@@ -71,14 +71,14 @@ class JLoggerDatabase extends JLogger
/**
* Constructor.
*
- * @param array $options Log object options.
+ * @param array &$options Log object options.
*
* @return void
*
* @since 11.1
* @throws LogException
*/
- public function __construct(array & $options)
+ public function __construct(array &$options)
{
// Call the parent constructor.
parent::__construct($options);
@@ -110,7 +110,7 @@ public function __construct(array & $options)
/**
* Method to add an entry to the log.
*
- * @param JLogEntry The log entry object to add to the log.
+ * @param JLogEntry $entry The log entry object to add to the log.
*
* @return void
*
@@ -149,7 +149,8 @@ protected function connect()
'prefix' => $this->prefix
);
- try {
+ try
+ {
$db = JDatabase::getInstance($options);
if (JError::isError($db)) {
@@ -163,7 +164,8 @@ protected function connect()
// Assign the database connector to the class.
$this->dbo = $db;
}
- catch (DatabaseException $e) {
+ catch (DatabaseException $e)
+ {
throw new LogException($e->getMessage());
}
}
View
2 libraries/joomla/log/loggers/echo.php
@@ -39,7 +39,7 @@ class JLoggerEcho extends JLogger
/**
* Method to add an entry to the log.
*
- * @param JLogEntry The log entry object to add to the log.
+ * @param JLogEntry $entry The log entry object to add to the log.
*
* @return void
*
View
6 libraries/joomla/log/loggers/formattedtext.php
@@ -68,13 +68,13 @@ class JLoggerFormattedText extends JLogger
/**
* Constructor.
*
- * @param array $options Log object options.
+ * @param array &$options Log object options.
*
* @return void
*
* @since 11.1
*/
- public function __construct(array & $options)
+ public function __construct(array &$options)
{
// Call the parent constructor.
parent::__construct($options);
@@ -123,7 +123,7 @@ public function __destruct()
/**
* Method to add an entry to the log.
*
- * @param JLogEntry The log entry object to add to the log.
+ * @param JLogEntry $entry The log entry object to add to the log.
*
* @return boolean True on success.
*
View
2 libraries/joomla/log/loggers/messagequeue.php
@@ -28,7 +28,7 @@ class JLoggerMessageQueue extends JLogger
/**
* Method to add an entry to the log.
*
- * @param JLogEntry The log entry object to add to the log.
+ * @param JLogEntry $entry The log entry object to add to the log.
*
* @return void
*
View
6 libraries/joomla/log/loggers/syslog.php
@@ -44,13 +44,13 @@ class JLoggerSysLog extends JLogger
/**
* Constructor.
*
- * @param array $options Log object options.
+ * @param array &$options Log object options.
*
* @return void
*
* @since 11.1
*/
- public function __construct(array & $options)
+ public function __construct(array &$options)
{
// Call the parent constructor.
parent::__construct($options);
@@ -104,7 +104,7 @@ public function __destruct()
/**
* Method to add an entry to the log.
*
- * @param JLogEntry The log entry object to add to the log.
+ * @param JLogEntry $entry The log entry object to add to the log.
*
* @return void
*
View
4 libraries/joomla/log/loggers/w3c.php
@@ -37,13 +37,13 @@ class JLoggerW3C extends JLoggerFormattedText
/**
* Constructor.
*
- * @param array $options Log object options.
+ * @param array &$options Log object options.
*
* @return void
*
* @since 11.1
*/
- public function __construct(array & $options)
+ public function __construct(array &$options)
{
// The name of the text file defaults to 'error.w3c.php' if not explicitly given.
if (empty($options['text_file'])) {
View
2 libraries/joomla/registry/format.php
@@ -47,7 +47,7 @@ public static function getInstance($type)
if (!class_exists($class)) {
$path = dirname(__FILE__).'/format/'.$type.'.php';
if (is_file($path)) {
- require_once $path;
+ include_once $path;
} else {
throw new JException(JText::_('JLIB_REGISTRY_EXCEPTION_LOAD_FORMAT_CLASS'), 500, E_ERROR);
}
View
35 libraries/joomla/registry/format/ini.php
@@ -26,9 +26,11 @@ class JRegistryFormatINI extends JRegistryFormat
* levels deep. Therefore we will only go through the first two levels of
* the object.
*
- * @param object Data source object.
- * @param array Options used by the formatter.
- * @return string INI formatted string.
+ * @param object $object Data source object.
+ * @param array $options Options used by the formatter.
+ *
+ * @return string INI formatted string.
+ *
* @since 11.1
*/
public function objectToString($object, $options = array())
@@ -38,20 +40,22 @@ public function objectToString($object, $options = array())
$global = array();
// Iterate over the object to set the properties.
- foreach (get_object_vars($object) as $key => $value) {
+ foreach (get_object_vars($object) as $key => $value)
+ {
// If the value is an object then we need to put it in a local section.
if (is_object($value)) {
// Add the section line.
$local[] = '';
$local[] = '['.$key.']';
// Add the properties for this section.
- foreach (get_object_vars($value) as $k => $v) {
- $local[] = $k.'='.$this->_getValueAsINI($v);
+ foreach (get_object_vars($value) as $k => $v)
+ {
+ $local[] = $k.'='.$this->getValueAsINI($v);
}
} else {
// Not in a section so add the property to the global array.
- $global[] = $key.'='.$this->_getValueAsINI($value);
+ $global[] = $key.'='.$this->getValueAsINI($value);
}
}
@@ -61,12 +65,12 @@ public function objectToString($object, $options = array())
/**
* Parse an INI formatted string and convert it into an object.
*
- * @param string INI formatted string to convert.
- * @param mixed An array of options used by the formatter, or a boolean setting to process sections.
+ * @param string $data INI formatted string to convert.
+ * @param mixed $options An array of options used by the formatter, or a boolean setting to process sections.
*
* @return object Data object.
- * @since 11.1
*
+ * @since 11.1
*/
public function stringToObject($data, $options = array())
{
@@ -96,7 +100,8 @@ public function stringToObject($data, $options = array())
$lines = explode("\n", $data);
// Process the lines.
- foreach ($lines as $line) {
+ foreach ($lines as $line)
+ {
// Trim any unnecessary whitespace.
$line = trim($line);
@@ -179,11 +184,13 @@ public function stringToObject($data, $options = array())
/**
* Method to get a value in an INI format.
*
- * @param mixed The value to convert to INI format.
- * @return string The value in INI format.
+ * @param mixed $value The value to convert to INI format.
+ *
+ * @return string The value in INI format.
+ *
* @since 11.1
*/
- protected function _getValueAsINI($value)
+ protected function getValueAsINI($value)
{
// Initialize variables.
$string = '';
View
27 libraries/joomla/registry/format/json.php
@@ -21,9 +21,11 @@ class JRegistryFormatJSON extends JRegistryFormat
/**
* Converts an object into a JSON formatted string.
*
- * @param object Data source object.
- * @param array Options used by the formatter.
- * @return string JSON formatted string.
+ * @param object $object Data source object.
+ * @param array $options Options used by the formatter.
+ *
+ * @return string JSON formatted string.
+ *
* @since 11.1
*/
public function objectToString($object, $options = array())
@@ -36,16 +38,27 @@ public function objectToString($object, $options = array())
*
* If the string is not in JSON format, this method will attempt to parse it as INI format.
*
- * @param string JSON formatted string to convert.
- * @param array Options used by the formatter.
+ * @param string $data JSON formatted string to convert.
+ * @param array $options Options used by the formatter.
+ *
* @return object Data object.
+ *
+ * @since 11.1
*/
- public function stringToObject($data, $process_sections = false)
+ public function stringToObject($data, $options = array('sections' => false))
{
+ // Fix legacy API.
+ if (is_bool($options)) {
+ $options = array('sections' => $options);
+
+ // Deprecation warning.
+ JLog::add('JRegistryFormatJSON::stringToObject() second argument should not be a boolean.', JLog::WARNING, 'deprecated');
+ }
+
$data = trim($data);
if ((substr($data, 0, 1) != '{') && (substr($data, -1, 1) != '}')) {
$ini = JRegistryFormat::getInstance('INI');
- $obj = $ini->stringToObject($data, $process_sections);
+ $obj = $ini->stringToObject($data, $options);
} else {
$obj = json_decode($data);
}
View
45 libraries/joomla/registry/format/php.php
@@ -16,25 +16,29 @@
* @subpackage Registry
* @since 11.1
*/
-class JRegistryFormatPHP extends JRegistryFormat {
-
+class JRegistryFormatPHP extends JRegistryFormat
+{
/**
* Converts an object into a php class string.
* - NOTE: Only one depth level is supported.
*
- * @param object Data Source Object
- * @param array Parameters used by the formatter
- * @return string Config class formatted string
+ * @param object $object Data Source Object
+ * @param array $params Parameters used by the formatter
+ *
+ * @return string Config class formatted string
+ *
+ * @since 11.1
*/
public function objectToString($object, $params = array())
{
// Build the object variables string
$vars = '';
- foreach (get_object_vars($object) as $k => $v) {
+ foreach (get_object_vars($object) as $k => $v)
+ {
if (is_scalar($v)) {
$vars .= "\tpublic $". $k . " = '" . addcslashes($v, '\\\'') . "';\n";
} else if (is_array($v)) {
- $vars .= "\tpublic $". $k . " = " . $this->_getArrayString($v) . ";\n";
+ $vars .= "\tpublic $". $k . " = " . $this->getArrayString($v) . ";\n";
}
}
@@ -51,24 +55,39 @@ public function objectToString($object, $params = array())
}
/**
- * Placeholder method
+ * Parse a PHP class formatted string and convert it into an object.
+ *
+ * @param string $data PHP Class formatted string to convert.
+ * @param array $options Options used by the formatter.
+ *
+ * @return object Data object.
*
- * @return boolean True
+ * @since 11.1
*/
- function stringToObject($data, $namespace='')
+ function stringToObject($data, $options = array())
{
return true;
}
- protected function _getArrayString($a)
+ /**
+ * Method to get an array as an exported string.
+ *
+ * @param array $a The array to get as a string.
+ *
+ * @return array
+ *
+ * @since 11.1
+ */
+ protected function getArrayString($a)
{
$s = 'array(';
$i = 0;
- foreach ($a as $k => $v) {
+ foreach ($a as $k => $v)
+ {
$s .= ($i) ? ', ' : '';
$s .= '"'.$k.'" => ';
if (is_array($v)) {
- $s .= $this->_getArrayString($v);
+ $s .= $this->getArrayString($v);
} else {
$s .= '"'.addslashes($v).'"';
}
View
47 libraries/joomla/registry/format/xml.php
@@ -23,9 +23,11 @@ class JRegistryFormatXML extends JRegistryFormat
* - If more than two levels of nested groups are necessary, since INI is not
* useful, XML or another format should be used.
*
- * @param object Data source object.
- * @param array Options used by the formatter.
- * @return string XML formatted string.
+ * @param object $object Data source object.
+ * @param array $options Options used by the formatter.
+ *
+ * @return string XML formatted string.
+ *
* @since 11.1
*/
public function objectToString($object, $options = array())
@@ -49,7 +51,7 @@ public function objectToString($object, $options = array())
$n->addAttribute('name', $k);
$n->addAttribute('type', gettype($v));
- $this->_getXmlChildren($n, $v, $nodeName);
+ $this->getXmlChildren($n, $v, $nodeName);
}
}
@@ -59,9 +61,11 @@ public function objectToString($object, $options = array())
/**
* Parse a XML formatted string and convert it into an object.
*
- * @param string XML formatted string to convert.
- * @param array Options used by the formatter.
+ * @param string $data XML formatted string to convert.
+ * @param array $options Options used by the formatter.
+ *
* @return object Data object.
+ *
* @since 11.1
*/
public function stringToObject($data, $options = array())
@@ -72,8 +76,9 @@ public function stringToObject($data, $options = array())
// Parse the XML string.
$xml = simplexml_load_string($data);
- foreach ($xml->children() as $node) {
- $obj->$node['name'] = $this->_getValueFromNode($node);
+ foreach ($xml->children() as $node)
+ {
+ $obj->$node['name'] = $this->getValueFromNode($node);
}
return $obj;
@@ -82,13 +87,13 @@ public function stringToObject($data, $options = array())
/**
* Method to get a PHP native value for a SimpleXMLElement object. -- called recursively
*
- * @param object SimpleXMLElement object for which to get the native value.
+ * @param object $node SimpleXMLElement object for which to get the native value.
*
- * @return mixed Native value of the SimpleXMLElement object.
+ * @return mixed Native value of the SimpleXMLElement object.
*
* @since 11.1
*/
- protected function _getValueFromNode($node)
+ protected function getValueFromNode($node)
{
switch ($node['type']) {
case 'integer':
@@ -108,14 +113,16 @@ protected function _getValueFromNode($node)
break;
case 'array':
$value = array();
- foreach ($node->children() as $child) {
- $value[(string) $child['name']] = $this->_getValueFromNode($child);
+ foreach ($node->children() as $child)
+ {
+ $value[(string) $child['name']] = $this->getValueFromNode($child);
}
break;
default:
$value = new stdClass;
- foreach ($node->children() as $child) {
- $value->$child['name'] = $this->_getValueFromNode($child);
+ foreach ($node->children() as $child)
+ {
+ $value->$child['name'] = $this->getValueFromNode($child);
}
break;
}
@@ -126,15 +133,15 @@ protected function _getValueFromNode($node)
/**
* Method to build a level of the XML string -- called recursively
*
- * @param object SimpleXMLElement object to attach children.
- * @param object Object that represents a node of the XML document.
- * @param string The name to use for node elements.
+ * @param object &$node SimpleXMLElement object to attach children.
+ * @param object $var Object that represents a node of the XML document.
+ * @param string $nodeName The name to use for node elements.
*
* @return void
*
* @since 11.1
*/
- protected function _getXmlChildren(& $node, $var, $nodeName)
+ protected function getXmlChildren(&$node, $var, $nodeName)
{
// Iterate over the object members.
foreach ((array) $var as $k => $v)
@@ -148,7 +155,7 @@ protected function _getXmlChildren(& $node, $var, $nodeName)
$n->addAttribute('name', $k);
$n->addAttribute('type', gettype($v));
- $this->_getXmlChildren($n, $v, $nodeName);
+ $this->getXmlChildren($n, $v, $nodeName);
}
}
}
View
57 libraries/joomla/registry/registry.php
@@ -31,7 +31,9 @@ class JRegistry
/**
* Constructor
*
- * @return JRegistry
+ * @param mixed $data The data to bind to the new JRegistry object.
+ *
+ * @return void
*
* @since 11.1
*/
@@ -78,7 +80,6 @@ public function __toString()
*
* @param string $key The name of the parameter.
* @param string $default An optional value for the parameter.
- * @param string An optional group for the parameter.
*
* @return string The value set, or the default if the value was not previously set (or null).
*
@@ -108,7 +109,8 @@ public function exists($path)
$node = $this->data;
// Traverse the registry to find the correct node for the result.
- for ($i = 0,$n = count($nodes); $i < $n; $i++) {
+ for ($i = 0,$n = count($nodes); $i < $n; $i++)
+ {
if (isset($node->$nodes[$i])) {
$node = $node->$nodes[$i];
} else {
@@ -139,8 +141,7 @@ public function get($path, $default = null)
// Initialise variables.
$result = $default;
- if(!strpos($path, '.'))
- {
+ if (!strpos($path, '.')) {
return (isset($this->data->$path) && $this->data->$path !== null && $this->data->$path !== '') ? $this->data->$path : $default;
}
// Explode the registry path into an array
@@ -150,7 +151,8 @@ public function get($path, $default = null)
$node = $this->data;
$found = false;
// Traverse the registry to find the correct node for the result.
- foreach ($nodes as $n) {
+ foreach ($nodes as $n)
+ {
if (isset($node->$n)) {
$node = $node->$n;
$found = true;
@@ -214,7 +216,6 @@ public function loadArray($array)
* Load the public variables of the object into the default namespace.
*
* @param object $object The object holding the publics to load
- * @param string Namespace to load the INI string into [optional]
*
* @return boolean True on success
*
@@ -272,7 +273,7 @@ public function loadString($data, $format = 'JSON', $options = array())
/**
* Merge a JRegistry object into this one
*
- * @param object $source Source JRegistry object to merge.
+ * @param object &$source Source JRegistry object to merge.
*
* @return boolean True on success
*
@@ -282,8 +283,9 @@ public function merge(&$source)
{
if ($source instanceof JRegistry) {
// Load the variables into the registry's default namespace.
- foreach ($source->toArray() as $k => $v) {
- if (($v !== null) && ($v !== '')){
+ foreach ($source->toArray() as $k => $v)
+ {
+ if (($v !== null) && ($v !== '')) {
$this->data->$k = $v;
}
}
@@ -312,7 +314,8 @@ public function set($path, $value)
$node = $this->data;
// Traverse the registry to find the correct node for the result.
- for ($i = 0, $n = count($nodes) - 1; $i < $n; $i++) {
+ for ($i = 0, $n = count($nodes) - 1; $i < $n; $i++)
+ {
if (!isset($node->$nodes[$i]) && ($i != $n)) {
$node->$nodes[$i] = new stdClass;
}
@@ -329,8 +332,6 @@ public function set($path, $value)
/**
* Transforms a namespace to an array
*
- * @param string Namespace to return [optional: null returns the default namespace]
- *
* @return array An associative array holding the namespace data
*
* @since 11.1
@@ -343,8 +344,6 @@ public function toArray()
/**
* Transforms a namespace to an object
*
- * @param string Namespace to return [optional: null returns the default namespace]
- *
* @return object An an object holding the namespace data
*
* @since 11.1
@@ -375,23 +374,24 @@ public function toString($format = 'JSON', $options = array())
/**
* Method to recursively bind data to a parent object.
*
- * @param object $parent The parent object on which to attach the data values.
- * @param mixed $data An array or object of data to bind to the parent object.
+ * @param object &$parent The parent object on which to attach the data values.
+ * @param mixed $data An array or object of data to bind to the parent object.
*
* @return void
*
* @since 11.1
*/
- protected function bindData(& $parent, $data)
+ protected function bindData(&$parent, $data)
{
// Ensure the input data is an array.
- if(is_object($data)) {
+ if (is_object($data)) {
$data = get_object_vars($data);
} else {
$data = (array) $data;
}
- foreach ($data as $k => $v) {
+ foreach ($data as $k => $v)
+ {
if ((is_array($v) && JArrayHelper::isAssociative($v)) || is_object($v)) {
$parent->$k = new stdClass;
$this->bindData($parent->$k, $v);
@@ -414,7 +414,8 @@ protected function asArray($data)
{
$array = array();
- foreach (get_object_vars((object) $data) as $k => $v) {
+ foreach (get_object_vars((object) $data) as $k => $v)
+ {
if (is_object($v)) {
$array[$k] = $this->asArray($v);
} else {
@@ -432,8 +433,8 @@ protected function asArray($data)
/**
* Load an XML string into the registry into the given namespace [or default if a namespace is not given]
*
- * @param string XML formatted string to load into the registry
- * @param string Namespace to load the XML string into [optional]
+ * @param string $data XML formatted string to load into the registry
+ * @param string $namespace Namespace to load the XML string into [optional]
*
* @return boolean True on success
*
@@ -483,7 +484,7 @@ public function loadJSON($data)
/**
* Create a namespace
*
- * @param string Name of the namespace to create
+ * @param string $namespace Name of the namespace to create
*
* @return boolean True on success
*
@@ -515,8 +516,8 @@ public function getNameSpaces()
/**
* Get a registry value
*
- * @param string Registry path (e.g. joomla.content.showauthor)
- * @param mixed Optional default value
+ * @param string $path Registry path (e.g. joomla.content.showauthor)
+ * @param mixed $default Optional default value
*
* @return mixed Value of entry or null
*
@@ -537,8 +538,8 @@ public function getValue($path, $default=null)
/**
* Set a registry value
*
- * @param string Registry Path (e.g. joomla.content.showauthor)
- * @param mixed Value of entry
+ * @param string $path Registry Path (e.g. joomla.content.showauthor)
+ * @param mixed $value Value of entry
*
* @return mixed The value after setting.
*

0 comments on commit 8371313

Please sign in to comment.