diff --git a/libraries/cms/application/site.php b/libraries/cms/application/site.php index ff95aa359f115..e35db34af8024 100644 --- a/libraries/cms/application/site.php +++ b/libraries/cms/application/site.php @@ -269,9 +269,7 @@ public function getLanguageFilter() */ public function getMenu($name = 'site', $options = array()) { - $menu = parent::getMenu($name, $options); - - return $menu; + return parent::getMenu($name, $options); } /** diff --git a/libraries/cms/component/helper.php b/libraries/cms/component/helper.php index af0bff70fd63f..8907650720d8c 100644 --- a/libraries/cms/component/helper.php +++ b/libraries/cms/component/helper.php @@ -113,9 +113,7 @@ public static function isInstalled($option) */ public static function getParams($option, $strict = false) { - $component = static::getComponent($option, $strict); - - return $component->params; + return static::getComponent($option, $strict)->params; } /** @@ -399,9 +397,8 @@ protected static function executeComponent($path) { ob_start(); require_once $path; - $contents = ob_get_clean(); - return $contents; + return ob_get_clean(); } /** diff --git a/libraries/cms/form/field/chromestyle.php b/libraries/cms/form/field/chromestyle.php index 46df7150a9b3e..93e7cdabc1fc9 100644 --- a/libraries/cms/form/field/chromestyle.php +++ b/libraries/cms/form/field/chromestyle.php @@ -138,8 +138,7 @@ protected function getTemplates() // Set the query and load the templates. $db->setQuery($query); - $templates = $db->loadObjectList('element'); - return $templates; + return $db->loadObjectList('element'); } } diff --git a/libraries/cms/form/field/frontend_language.php b/libraries/cms/form/field/frontend_language.php index 11cccaef10186..ed2dc8ce1bd3e 100644 --- a/libraries/cms/form/field/frontend_language.php +++ b/libraries/cms/form/field/frontend_language.php @@ -71,11 +71,9 @@ protected function getOptions() } // Merge any additional options in the XML definition. - $options = array_merge( + return array_merge( parent::getOptions(), $languages ); - - return $options; } } diff --git a/libraries/cms/form/field/menu.php b/libraries/cms/form/field/menu.php index 33c2e5a3e04a3..1d75407a708e5 100644 --- a/libraries/cms/form/field/menu.php +++ b/libraries/cms/form/field/menu.php @@ -116,8 +116,6 @@ protected function getGroups() } // Merge any additional options in the XML definition. - $groups = array_merge(parent::getGroups(), $groups); - - return $groups; + return array_merge(parent::getGroups(), $groups); } } diff --git a/libraries/cms/helper/content.php b/libraries/cms/helper/content.php index 68d1c37f3df1f..5148a9aa8e752 100644 --- a/libraries/cms/helper/content.php +++ b/libraries/cms/helper/content.php @@ -182,9 +182,7 @@ public static function getLanguageId($langCode) ->where($db->quoteName('lang_code') . ' = ' . $db->quote($langCode)); $db->setQuery($query); - $id = $db->loadResult(); - - return $id; + return $db->loadResult(); } /** diff --git a/libraries/cms/helper/helper.php b/libraries/cms/helper/helper.php index aec35796e9e3d..dcf567a4533a6 100644 --- a/libraries/cms/helper/helper.php +++ b/libraries/cms/helper/helper.php @@ -64,9 +64,7 @@ public function getLanguageId($langCode) ->where($db->quoteName('lang_code') . ' = ' . $db->quote($langCode)); $db->setQuery($query); - $id = $db->loadResult(); - - return $id; + return $db->loadResult(); } /** diff --git a/libraries/cms/html/sidebar.php b/libraries/cms/html/sidebar.php index 1671a2c70cd35..e097523ebaa1c 100644 --- a/libraries/cms/html/sidebar.php +++ b/libraries/cms/html/sidebar.php @@ -60,9 +60,8 @@ public static function render() // Create a layout object and ask it to render the sidebar $layout = new JLayoutFile('joomla.sidebars.submenu'); - $sidebarHtml = $layout->render($data); - return $sidebarHtml; + return $layout->render($data); } /** diff --git a/libraries/cms/html/tel.php b/libraries/cms/html/tel.php index 1a5ba3787b519..71ea6a02971db 100644 --- a/libraries/cms/html/tel.php +++ b/libraries/cms/html/tel.php @@ -70,8 +70,6 @@ public static function tel($number, $displayplan) $display[4] = '.e164.arpa'; } - $display = implode($display, ''); - - return $display; + return implode($display, ''); } } diff --git a/libraries/cms/html/user.php b/libraries/cms/html/user.php index 609336bd749ad..0125ee84ffb31 100644 --- a/libraries/cms/html/user.php +++ b/libraries/cms/html/user.php @@ -71,8 +71,7 @@ public static function userlist() ->where('a.block = 0') ->order('a.name'); $db->setQuery($query); - $items = $db->loadObjectList(); - return $items; + return $db->loadObjectList(); } } diff --git a/libraries/cms/installer/adapter/package.php b/libraries/cms/installer/adapter/package.php index bddf318fbc883..3ec5c076b5b19 100644 --- a/libraries/cms/installer/adapter/package.php +++ b/libraries/cms/installer/adapter/package.php @@ -721,11 +721,10 @@ protected function _getExtensionId($type, $id, $client, $group) } $db->setQuery($query); - $result = $db->loadResult(); // Note: For templates, libraries and packages their unique name is their key. // This means they come out the same way they came in. - return $result; + return $db->loadResult(); } /** diff --git a/libraries/cms/layout/helper.php b/libraries/cms/layout/helper.php index 8e8094b65478a..13db595687261 100644 --- a/libraries/cms/layout/helper.php +++ b/libraries/cms/layout/helper.php @@ -45,9 +45,8 @@ public static function debug($layoutFile, $displayData = null, $basePath = '', $ // Make sure we send null to JLayoutFile if no path set $basePath = empty($basePath) ? null : $basePath; $layout = new JLayoutFile($layoutFile, $basePath, $options); - $renderedLayout = $layout->debug($displayData); - return $renderedLayout; + return $layout->debug($displayData); } /** @@ -69,8 +68,7 @@ public static function render($layoutFile, $displayData = null, $basePath = '', // Make sure we send null to JLayoutFile if no path set $basePath = empty($basePath) ? null : $basePath; $layout = new JLayoutFile($layoutFile, $basePath, $options); - $renderedLayout = $layout->render($displayData); - return $renderedLayout; + return $layout->render($displayData); } } diff --git a/libraries/cms/library/helper.php b/libraries/cms/library/helper.php index 5c434b0804685..fab73819fea60 100644 --- a/libraries/cms/library/helper.php +++ b/libraries/cms/library/helper.php @@ -69,9 +69,7 @@ public static function getLibrary($element, $strict = false) */ public static function isEnabled($element) { - $result = static::getLibrary($element, true); - - return $result->enabled; + return static::getLibrary($element, true)->enabled; } /** @@ -87,9 +85,7 @@ public static function isEnabled($element) */ public static function getParams($element, $strict = false) { - $library = static::getLibrary($element, $strict); - - return $library->params; + return static::getLibrary($element, $strict)->params; } /** diff --git a/libraries/cms/menu/menu.php b/libraries/cms/menu/menu.php index c9a45b88eb9ce..118b5d78d2d97 100644 --- a/libraries/cms/menu/menu.php +++ b/libraries/cms/menu/menu.php @@ -213,9 +213,8 @@ public function setActive($id) if (isset($this->_items[$id])) { $this->_active = $id; - $result = &$this->_items[$id]; - return $result; + return $this->_items[$id]; } return; @@ -232,9 +231,7 @@ public function getActive() { if ($this->_active) { - $item = &$this->_items[$this->_active]; - - return $item; + return $this->_items[$this->_active]; } return; diff --git a/libraries/cms/ucm/content.php b/libraries/cms/ucm/content.php index 8a8254a77fda9..fe5714848e8f3 100644 --- a/libraries/cms/ucm/content.php +++ b/libraries/cms/ucm/content.php @@ -227,8 +227,7 @@ public function getPrimaryKey($typeId, $contentItemId) ) ); $db->setQuery($queryccid); - $primaryKey = $db->loadResult(); - return $primaryKey; + return $db->loadResult(); } } diff --git a/libraries/cms/ucm/type.php b/libraries/cms/ucm/type.php index 7b369f35b5f24..6751946a9bec9 100644 --- a/libraries/cms/ucm/type.php +++ b/libraries/cms/ucm/type.php @@ -116,9 +116,7 @@ public function getType($pk = null) $query->where($this->db->quoteName('ct.type_id') . ' = ' . (int) $pk); $this->db->setQuery($query); - $type = $this->db->loadObject(); - - return $type; + return $this->db->loadObject(); } /** @@ -139,9 +137,7 @@ public function getTypeByAlias($typeAlias = null) $this->db->setQuery($query); - $type = $this->db->loadObject(); - - return $type; + return $this->db->loadObject(); } /**