From 825ed21d53bfd6c9d2593770470e83c5f9fbae00 Mon Sep 17 00:00:00 2001 From: Jennifer Marriott Date: Wed, 30 Nov 2011 07:04:24 -0600 Subject: [PATCH 01/14] This is to fix the bug reported on the tracker #26877 http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=26877 --- libraries/joomla/form/form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/joomla/form/form.php b/libraries/joomla/form/form.php index cb84d127df..c740e315bb 100644 --- a/libraries/joomla/form/form.php +++ b/libraries/joomla/form/form.php @@ -1829,7 +1829,7 @@ protected function validateField($element, $group = null, $value = null, $input // If the object could not be loaded return an error message. if ($rule === false) { - return new JException(JText::sprintf('JLIB_FORM_VALIDATE_FIELD_RULE_MISSING', $rule), -2, E_ERROR); + return new JException(JText::sprintf('JLIB_FORM_VALIDATE_FIELD_RULE_MISSING', $type), -2, E_ERROR); } // Run the field validation rule test. From ac54da3dacb70a8de9c6c0054ab016ea8110f3a8 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Wed, 30 Nov 2011 19:58:37 +0600 Subject: [PATCH 02/14] Proper return types for DB objects and getDbo --- libraries/joomla/base/adapter.php | 4 ++-- libraries/joomla/database/table.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/joomla/base/adapter.php b/libraries/joomla/base/adapter.php index 16b3dc77e1..1dcfe552f0 100644 --- a/libraries/joomla/base/adapter.php +++ b/libraries/joomla/base/adapter.php @@ -55,7 +55,7 @@ class JAdapter extends JObject /** * Database Connector Object * - * @var object + * @var JDatabase * @since 11.1 */ protected $_db; @@ -81,7 +81,7 @@ public function __construct($basepath, $classprefix = null, $adapterfolder = nul /** * Get the database connector object * - * @return object Database connector object + * @return JDatabase Database connector object * * @since 11.1 */ diff --git a/libraries/joomla/database/table.php b/libraries/joomla/database/table.php index 5fc38a0de2..4e2fca0249 100644 --- a/libraries/joomla/database/table.php +++ b/libraries/joomla/database/table.php @@ -322,7 +322,7 @@ public function getKeyName() /** * Method to get the JDatabase connector object. * - * @return object The internal database connector object. + * @return JDatabase The internal database connector object. * * @link http://docs.joomla.org/JTable/getDBO * @since 11.1 From a1a79a829c95ed92e4697b56ac2daf50df1c3444 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Wed, 30 Nov 2011 20:46:02 +0600 Subject: [PATCH 03/14] Variable types in Registry package --- libraries/joomla/registry/format.php | 2 +- libraries/joomla/registry/format/xml.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/joomla/registry/format.php b/libraries/joomla/registry/format.php index 631180da26..4c2b227178 100644 --- a/libraries/joomla/registry/format.php +++ b/libraries/joomla/registry/format.php @@ -30,7 +30,7 @@ abstract class JRegistryFormat * * @param string $type The format to load * - * @return object Registry format handler + * @return JRegistryFormat Registry format handler * * @since 11.1 * @throws JException diff --git a/libraries/joomla/registry/format/xml.php b/libraries/joomla/registry/format/xml.php index 6db3b8fb8f..e376c58bdd 100644 --- a/libraries/joomla/registry/format/xml.php +++ b/libraries/joomla/registry/format/xml.php @@ -121,9 +121,9 @@ protected function getValueFromNode($node) /** * Method to build a level of the XML string -- called recursively * - * @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. + * @param SimpleXMLElement &$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 * From 045f938f61632d48d8c199927cb212f417f30a1b Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Wed, 30 Nov 2011 20:46:30 +0600 Subject: [PATCH 04/14] Variable types in Base and Document packages --- libraries/joomla/base/adapterinstance.php | 4 ++-- libraries/joomla/document/document.php | 2 +- libraries/joomla/document/renderer.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libraries/joomla/base/adapterinstance.php b/libraries/joomla/base/adapterinstance.php index 724cc9f6d6..5416700549 100644 --- a/libraries/joomla/base/adapterinstance.php +++ b/libraries/joomla/base/adapterinstance.php @@ -21,7 +21,7 @@ class JAdapterInstance extends JObject /** * Parent * - * @var object + * @var JInstaller * @since 11.1 */ protected $parent = null; @@ -29,7 +29,7 @@ class JAdapterInstance extends JObject /** * Database * - * @var object + * @var JDatabase * @since 11.1 */ protected $db = null; diff --git a/libraries/joomla/document/document.php b/libraries/joomla/document/document.php index 761e6f4894..4b8f52e35b 100644 --- a/libraries/joomla/document/document.php +++ b/libraries/joomla/document/document.php @@ -905,7 +905,7 @@ public function _getTab() * * @param string $type The renderer type * - * @return mixed Object or null if class does not exist + * @return JDocumentRenderer Object or null if class does not exist * * @since 11.1 */ diff --git a/libraries/joomla/document/renderer.php b/libraries/joomla/document/renderer.php index c2db53810d..188d4caa5a 100644 --- a/libraries/joomla/document/renderer.php +++ b/libraries/joomla/document/renderer.php @@ -21,7 +21,7 @@ class JDocumentRenderer extends JObject /** * Reference to the JDocument object that instantiated the renderer * - * @var object + * @var JDocument * @since 11.1 */ protected $_doc = null; @@ -37,7 +37,7 @@ class JDocumentRenderer extends JObject /** * Class constructor * - * @param object &$doc A reference to the JDocument object that instantiated the renderer + * @param JDocument &$doc A reference to the JDocument object that instantiated the renderer * * @since 11.1 */ From 826ba8d477202fcecff3d2084cd8060bfc78cd92 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Wed, 30 Nov 2011 20:46:57 +0600 Subject: [PATCH 05/14] Variable types in Filter and Form packages --- libraries/joomla/filter/filterinput.php | 2 +- libraries/joomla/form/fields/editor.php | 2 +- libraries/joomla/form/formfield.php | 4 ++-- libraries/joomla/form/rules/email.php | 14 +++++++------- libraries/joomla/form/rules/equals.php | 14 +++++++------- libraries/joomla/form/rules/options.php | 14 +++++++------- libraries/joomla/form/rules/username.php | 14 +++++++------- 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/libraries/joomla/filter/filterinput.php b/libraries/joomla/filter/filterinput.php index a8d96f3399..61043cb1ef 100644 --- a/libraries/joomla/filter/filterinput.php +++ b/libraries/joomla/filter/filterinput.php @@ -132,7 +132,7 @@ public function __construct($tagsArray = array(), $attrArray = array(), $tagsMet * @param integer $attrMethod WhiteList method = 0, BlackList method = 1 * @param integer $xssAuto Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1 * - * @return object The JFilterInput object. + * @return JFilterInput The JFilterInput object. * * @since 11.1 */ diff --git a/libraries/joomla/form/fields/editor.php b/libraries/joomla/form/fields/editor.php index 594f0f013f..6a76e754ad 100644 --- a/libraries/joomla/form/fields/editor.php +++ b/libraries/joomla/form/fields/editor.php @@ -90,7 +90,7 @@ protected function getInput() /** * Method to get a JEditor object based on the form field. * - * @return object The JEditor object. + * @return JEditor The JEditor object. * * @since 11.1 */ diff --git a/libraries/joomla/form/formfield.php b/libraries/joomla/form/formfield.php index 944c2d5151..c29d00d133 100644 --- a/libraries/joomla/form/formfield.php +++ b/libraries/joomla/form/formfield.php @@ -29,7 +29,7 @@ abstract class JFormField /** * The JXMLElement object of the XML element that describes the form field. * - * @var object + * @var JXMLElement * @since 11.1 */ protected $element; @@ -37,7 +37,7 @@ abstract class JFormField /** * The JForm object of the form attached to the form field. * - * @var object + * @var JForm * @since 11.1 */ protected $form; diff --git a/libraries/joomla/form/rules/email.php b/libraries/joomla/form/rules/email.php index 5082305393..0fa648f1aa 100644 --- a/libraries/joomla/form/rules/email.php +++ b/libraries/joomla/form/rules/email.php @@ -31,13 +31,13 @@ class JFormRuleEmail extends JFormRule /** * Method to test the email address and optionally check for uniqueness. * - * @param object &$element The JXmlElement object representing the tag for the form field object. - * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. - * For example if the field has name="foo" and the group value is set to "bar" then the - * full field name would end up being "bar[foo]". - * @param object &$input An optional JRegistry object with the entire data set to validate against the entire form. - * @param object &$form The form object for which the field is being tested. + * @param JXMLElement &$element The JXMLElement object representing the tag for the form field object. + * @param mixed $value The form field value to validate. + * @param string $group The field name group control value. This acts as as an array container for the field. + * For example if the field has name="foo" and the group value is set to "bar" then the + * full field name would end up being "bar[foo]". + * @param JRegistry &$input An optional JRegistry object with the entire data set to validate against the entire form. + * @param object &$form The form object for which the field is being tested. * * @return boolean True if the value is valid, false otherwise. * diff --git a/libraries/joomla/form/rules/equals.php b/libraries/joomla/form/rules/equals.php index 69a81e0ea2..26e47fd089 100644 --- a/libraries/joomla/form/rules/equals.php +++ b/libraries/joomla/form/rules/equals.php @@ -25,13 +25,13 @@ class JFormRuleEquals extends JFormRule * XML needs a validate attribute of equals and a field attribute * that is equal to the field to test against. * - * @param object &$element The JXmlElement object representing the tag for the form field object. - * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. - * For example if the field has name="foo" and the group value is set to "bar" then the - * full field name would end up being "bar[foo]". - * @param object &$input An optional JRegistry object with the entire data set to validate against the entire form. - * @param object &$form The form object for which the field is being tested. + * @param JXMLElement &$element The JXmlElement object representing the tag for the form field object. + * @param mixed $value The form field value to validate. + * @param string $group The field name group control value. This acts as as an array container for the field. + * For example if the field has name="foo" and the group value is set to "bar" then the + * full field name would end up being "bar[foo]". + * @param JRegistry &$input An optional JRegistry object with the entire data set to validate against the entire form. + * @param object &$form The form object for which the field is being tested. * * @return boolean True if the value is valid, false otherwise. * diff --git a/libraries/joomla/form/rules/options.php b/libraries/joomla/form/rules/options.php index 50ed9439d0..890a008436 100644 --- a/libraries/joomla/form/rules/options.php +++ b/libraries/joomla/form/rules/options.php @@ -22,13 +22,13 @@ class JFormRuleOptions extends JFormRule /** * Method to test the value. * - * @param object &$element The JXmlElement object representing the tag for the form field object. - * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. - * For example if the field has name="foo" and the group value is set to "bar" then the - * full field name would end up being "bar[foo]". - * @param object &$input An optional JRegistry object with the entire data set to validate against the entire form. - * @param object &$form The form object for which the field is being tested. + * @param JXMLElement &$element The JXMLElement object representing the tag for the form field object. + * @param mixed $value The form field value to validate. + * @param string $group The field name group control value. This acts as as an array container for the field. + * For example if the field has name="foo" and the group value is set to "bar" then the + * full field name would end up being "bar[foo]". + * @param JRegistry &$input An optional JRegistry object with the entire data set to validate against the entire form. + * @param object &$form The form object for which the field is being tested. * * @return boolean True if the value is valid, false otherwise. * diff --git a/libraries/joomla/form/rules/username.php b/libraries/joomla/form/rules/username.php index c808e94fa2..b3b56455db 100644 --- a/libraries/joomla/form/rules/username.php +++ b/libraries/joomla/form/rules/username.php @@ -23,13 +23,13 @@ class JFormRuleUsername extends JFormRule /** * Method to test the username for uniqueness. * - * @param object &$element The JXmlElement object representing the tag for the form field object. - * @param mixed $value The form field value to validate. - * @param string $group The field name group control value. This acts as as an array container for the field. - * For example if the field has name="foo" and the group value is set to "bar" then the - * full field name would end up being "bar[foo]". - * @param object &$input An optional JRegistry object with the entire data set to validate against the entire form. - * @param object &$form The form object for which the field is being tested. + * @param JXMLElement &$element The JXMLElement object representing the tag for the form field object. + * @param mixed $value The form field value to validate. + * @param string $group The field name group control value. This acts as as an array container for the field. + * For example if the field has name="foo" and the group value is set to "bar" then the + * full field name would end up being "bar[foo]". + * @param JRegistry &$input An optional JRegistry object with the entire data set to validate against the entire form. + * @param object &$form The form object for which the field is being tested. * * @return boolean True if the value is valid, false otherwise. * From 3a73cb5a641494a05f4461ded11a6c3190697406 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Wed, 30 Nov 2011 20:47:27 +0600 Subject: [PATCH 06/14] Variable types in HTML package --- libraries/joomla/html/parameter/element/calendar.php | 8 ++++---- libraries/joomla/html/parameter/element/category.php | 8 ++++---- libraries/joomla/html/parameter/element/filelist.php | 8 ++++---- libraries/joomla/html/parameter/element/folderlist.php | 8 ++++---- libraries/joomla/html/parameter/element/hidden.php | 8 ++++---- libraries/joomla/html/parameter/element/imagelist.php | 8 ++++---- libraries/joomla/html/parameter/element/languages.php | 8 ++++---- libraries/joomla/html/parameter/element/list.php | 10 +++++----- libraries/joomla/html/parameter/element/menuitem.php | 8 ++++---- .../joomla/html/parameter/element/modulelayouts.php | 2 +- libraries/joomla/html/parameter/element/password.php | 8 ++++---- libraries/joomla/html/parameter/element/radio.php | 8 ++++---- libraries/joomla/html/parameter/element/sql.php | 8 ++++---- libraries/joomla/html/parameter/element/text.php | 8 ++++---- libraries/joomla/html/parameter/element/textarea.php | 8 ++++---- libraries/joomla/html/parameter/element/usergroup.php | 8 ++++---- libraries/joomla/html/toolbar/button.php | 2 +- 17 files changed, 63 insertions(+), 63 deletions(-) diff --git a/libraries/joomla/html/parameter/element/calendar.php b/libraries/joomla/html/parameter/element/calendar.php index e7a956be9f..d369ca189d 100644 --- a/libraries/joomla/html/parameter/element/calendar.php +++ b/libraries/joomla/html/parameter/element/calendar.php @@ -31,10 +31,10 @@ class JElementCalendar extends JElement /** * Fetch a calendar element * - * @param string $name Field name - * @param string $value The date value - * @param object &$node JSimpleXMLElement node object containing the settings for the element - * @param string $control_name Control name + * @param string $name Field name + * @param string $value The date value + * @param JSimpleXMLElement &$node JSimpleXMLElement node object containing the settings for the element + * @param string $control_name Control name * * @return string HTML string for a calendar * diff --git a/libraries/joomla/html/parameter/element/category.php b/libraries/joomla/html/parameter/element/category.php index 0e52f1c256..577ea755ac 100644 --- a/libraries/joomla/html/parameter/element/category.php +++ b/libraries/joomla/html/parameter/element/category.php @@ -29,10 +29,10 @@ class JElementCategory extends JElement /** * Fetch the element * - * @param string $name Element name - * @param string $value Element value - * @param object &$node Extension - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node Extension + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/filelist.php b/libraries/joomla/html/parameter/element/filelist.php index 7a9303e2b7..6ded8f2f82 100644 --- a/libraries/joomla/html/parameter/element/filelist.php +++ b/libraries/joomla/html/parameter/element/filelist.php @@ -29,10 +29,10 @@ class JElementFilelist extends JElement /** * Fetch a filelist element * - * @param string $name Element name - * @param string $value Element value - * @param object &$node Element object - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node Element object + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/folderlist.php b/libraries/joomla/html/parameter/element/folderlist.php index 46ed4daa51..629ff4ffc5 100644 --- a/libraries/joomla/html/parameter/element/folderlist.php +++ b/libraries/joomla/html/parameter/element/folderlist.php @@ -29,10 +29,10 @@ class JElementFolderlist extends JElement /** * Fetch a folderlist element * - * @param string $name Element name - * @param string $value Element value - * @param object &$node Element object - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node Element object + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/hidden.php b/libraries/joomla/html/parameter/element/hidden.php index 70d1866fe2..1da9ef258d 100644 --- a/libraries/joomla/html/parameter/element/hidden.php +++ b/libraries/joomla/html/parameter/element/hidden.php @@ -30,10 +30,10 @@ class JElementHidden extends JElement /** * Fetch a hidden element * - * @param string $name Element name - * @param string $value Element value - * @param object &$node Element object - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node Element object + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/imagelist.php b/libraries/joomla/html/parameter/element/imagelist.php index d103b7c23c..0b737b9b28 100644 --- a/libraries/joomla/html/parameter/element/imagelist.php +++ b/libraries/joomla/html/parameter/element/imagelist.php @@ -29,10 +29,10 @@ class JElementImageList extends JElement /** * Fetch imagelist element * - * @param string $name Element name - * @param string $value Element value - * @param object &$node Element object - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node Element object + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/languages.php b/libraries/joomla/html/parameter/element/languages.php index 054687bbee..4f396d7381 100644 --- a/libraries/joomla/html/parameter/element/languages.php +++ b/libraries/joomla/html/parameter/element/languages.php @@ -30,10 +30,10 @@ class JElementLanguages extends JElement /** * Fetch the language list element * - * @param string $name Element name - * @param string $value Element value - * @param object &$node Element object - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node Element object + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/list.php b/libraries/joomla/html/parameter/element/list.php index eb66883707..234a1c978b 100644 --- a/libraries/joomla/html/parameter/element/list.php +++ b/libraries/joomla/html/parameter/element/list.php @@ -29,7 +29,7 @@ class JElementList extends JElement /** * Get the options for the element * - * @param object &$node Element object + * @param JSimpleXMLElement &$node Element object * * @return array * @@ -55,10 +55,10 @@ protected function _getOptions(&$node) /** * Fetch the HTML code for the parameter element. * - * @param string $name The field name. - * @param mixed $value The value of the field. - * @param object &$node The current JSimpleXMLElement node. - * @param string $control_name The name of the HTML control. + * @param string $name The field name. + * @param mixed $value The value of the field. + * @param JSimpleXMLElement &$node The current JSimpleXMLElement node. + * @param string $control_name The name of the HTML control. * * @return string * diff --git a/libraries/joomla/html/parameter/element/menuitem.php b/libraries/joomla/html/parameter/element/menuitem.php index 563635db86..a5d90944b5 100644 --- a/libraries/joomla/html/parameter/element/menuitem.php +++ b/libraries/joomla/html/parameter/element/menuitem.php @@ -29,10 +29,10 @@ class JElementMenuItem extends JElement /** * Fetch menu item element HTML * - * @param string $name Element name - * @param string $value Element value - * @param object &$node The current JSimpleXMLElement node. - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node The current JSimpleXMLElement node. + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/modulelayouts.php b/libraries/joomla/html/parameter/element/modulelayouts.php index a75a63d283..59dda9e245 100644 --- a/libraries/joomla/html/parameter/element/modulelayouts.php +++ b/libraries/joomla/html/parameter/element/modulelayouts.php @@ -30,7 +30,7 @@ class JElementModuleLayouts extends JElementList /** * Get the options for the list. * - * @param object &$node The current JSimpleXMLElement node. + * @param JSimpleXMLElement &$node The current JSimpleXMLElement node. * * @return string * diff --git a/libraries/joomla/html/parameter/element/password.php b/libraries/joomla/html/parameter/element/password.php index e1332986c1..e0034b1369 100644 --- a/libraries/joomla/html/parameter/element/password.php +++ b/libraries/joomla/html/parameter/element/password.php @@ -29,10 +29,10 @@ class JElementPassword extends JElement /** * Fetch a html for a password element * - * @param string $name Element name - * @param string $value Element value - * @param object &$node The current JSimpleXMLElement node. - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node The current JSimpleXMLElement node. + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/radio.php b/libraries/joomla/html/parameter/element/radio.php index d420accfee..1c50618985 100644 --- a/libraries/joomla/html/parameter/element/radio.php +++ b/libraries/joomla/html/parameter/element/radio.php @@ -29,10 +29,10 @@ class JElementRadio extends JElement /** * Fetch a html for a radio button * - * @param string $name Element name - * @param string $value Element value - * @param object &$node The current JSimpleXMLElement node. - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node The current JSimpleXMLElement node. + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/sql.php b/libraries/joomla/html/parameter/element/sql.php index e4bf3b59ce..a780f5e0da 100644 --- a/libraries/joomla/html/parameter/element/sql.php +++ b/libraries/joomla/html/parameter/element/sql.php @@ -29,10 +29,10 @@ class JElementSQL extends JElement /** * Fetch the sql element * - * @param string $name Element name - * @param string $value Element value - * @param object &$node The current JSimpleXMLElement node. - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node The current JSimpleXMLElement node. + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/text.php b/libraries/joomla/html/parameter/element/text.php index 72cf7f3ab9..6468401a76 100644 --- a/libraries/joomla/html/parameter/element/text.php +++ b/libraries/joomla/html/parameter/element/text.php @@ -29,10 +29,10 @@ class JElementText extends JElement /** * Fetch the text field element * - * @param string $name Element name - * @param string $value Element value - * @param object &$node The current JSimpleXMLElement node. - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node The current JSimpleXMLElement node. + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/textarea.php b/libraries/joomla/html/parameter/element/textarea.php index 80e71a8682..2d4e8a3d60 100644 --- a/libraries/joomla/html/parameter/element/textarea.php +++ b/libraries/joomla/html/parameter/element/textarea.php @@ -29,10 +29,10 @@ class JElementTextarea extends JElement /** * Fetch the element * - * @param string $name Element name - * @param string $value Element value - * @param object &$node The current JSimpleXMLElement node. - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node The current JSimpleXMLElement node. + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/parameter/element/usergroup.php b/libraries/joomla/html/parameter/element/usergroup.php index 9a0cd6e8cd..4a0a05a56e 100644 --- a/libraries/joomla/html/parameter/element/usergroup.php +++ b/libraries/joomla/html/parameter/element/usergroup.php @@ -29,10 +29,10 @@ class JElementUserGroup extends JElement /** * Fetch the timezones element * - * @param string $name Element name - * @param string $value Element value - * @param object &$node The current JSimpleXMLElement node. - * @param string $control_name Control name + * @param string $name Element name + * @param string $value Element value + * @param JSimpleXMLElement &$node The current JSimpleXMLElement node. + * @param string $control_name Control name * * @return string * diff --git a/libraries/joomla/html/toolbar/button.php b/libraries/joomla/html/toolbar/button.php index efeaa95442..a36d1d5f9d 100644 --- a/libraries/joomla/html/toolbar/button.php +++ b/libraries/joomla/html/toolbar/button.php @@ -32,7 +32,7 @@ abstract class JButton extends JObject /** * reference to the object that instantiated the element * - * @var object + * @var JButton */ protected $_parent = null; From 0634d56eb3605d3d45085f57023bd81accb8d16b Mon Sep 17 00:00:00 2001 From: Nikolai Plath Date: Thu, 1 Dec 2011 03:15:15 -0500 Subject: [PATCH 07/14] Code style: Fix an error in ConcatenationSpacingSniff when the operator is on a new line --- .../WhiteSpace/ConcatenationSpacingSniff.php | 36 ++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/build/phpcs/Joomla/Sniffs/WhiteSpace/ConcatenationSpacingSniff.php b/build/phpcs/Joomla/Sniffs/WhiteSpace/ConcatenationSpacingSniff.php index 0aeb986eee..b3f0d9476f 100644 --- a/build/phpcs/Joomla/Sniffs/WhiteSpace/ConcatenationSpacingSniff.php +++ b/build/phpcs/Joomla/Sniffs/WhiteSpace/ConcatenationSpacingSniff.php @@ -55,9 +55,30 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) { $tokens = $phpcsFile->getTokens(); - if($tokens[($stackPtr - 1)]['code'] != T_WHITESPACE - || $tokens[($stackPtr + 1)]['code'] != T_WHITESPACE - ) + if($tokens[($stackPtr + 1)]['code'] != T_WHITESPACE) + { + // space after + $message = 'Concat operator must be followed by one space'; + $phpcsFile->addError($message, $stackPtr, 'Missing'); + } + else + { + $found = strlen($tokens[($stackPtr + 1)]['content']); + + if($found > 1) + { + $error = sprintf('Expected 1 space after concat operator; %s found', $found); + $phpcsFile->addError($error, $stackPtr, 'Too much'); + } + } + + if($tokens[($stackPtr - 1)]['code'] != T_WHITESPACE) + { + // space before + $message = 'Concat operator must be preceeded by one space'; + $phpcsFile->addError($message, $stackPtr, 'Missing'); + } + else { if(strpos($tokens[($stackPtr - 2)]['content'], $phpcsFile->eolChar) !== false || strpos($tokens[($stackPtr - 1)]['content'], $phpcsFile->eolChar) !== false) @@ -66,8 +87,13 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) return; } - $message = 'Concat operator must be surrounded by spaces'; - $phpcsFile->addError($message, $stackPtr, 'Missing'); + $found = strlen($tokens[($stackPtr - 1)]['content']); + + if($found > 1) + { + $error = sprintf('Expected 1 space before concat operator; %s found', $found); + $phpcsFile->addError($error, $stackPtr, 'Too much'); + } } }//function }//class From fe7dc318946aa6da01cb294937a1ac4515c54ba2 Mon Sep 17 00:00:00 2001 From: Nikolai Plath Date: Thu, 1 Dec 2011 03:16:05 -0500 Subject: [PATCH 08/14] Code style: Fix some concatenation spacing violations --- libraries/joomla/application/application.php | 4 ++-- libraries/joomla/html/html/batch.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/joomla/application/application.php b/libraries/joomla/application/application.php index 41c10f6482..e044f706de 100644 --- a/libraries/joomla/application/application.php +++ b/libraries/joomla/application/application.php @@ -419,14 +419,14 @@ public function redirect($url, $msg = '', $msgType = 'message', $moved = false) { // MSIE type browser and/or server cause issues when url contains utf8 character,so use a javascript redirect method echo '' - .''; + . ''; } elseif (!$moved and $navigator->isBrowser('konqueror')) { // WebKit browser (identified as konqueror by Joomla!) - Do not use 303, as it causes subresources // reload (https://bugs.webkit.org/show_bug.cgi?id=38690) echo '' - .''; + . ''; } else { diff --git a/libraries/joomla/html/html/batch.php b/libraries/joomla/html/html/batch.php index 0eda9aa3f4..5ccc1dd2f7 100644 --- a/libraries/joomla/html/html/batch.php +++ b/libraries/joomla/html/html/batch.php @@ -81,7 +81,7 @@ public static function language() // Create the batch selector to change an access level on a selection list. $lines = array( '', '