Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions libraries/cms/application/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
7 changes: 2 additions & 5 deletions libraries/cms/component/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -399,9 +397,8 @@ protected static function executeComponent($path)
{
ob_start();
require_once $path;
$contents = ob_get_clean();

return $contents;
return ob_get_clean();
}

/**
Expand Down
3 changes: 1 addition & 2 deletions libraries/cms/form/field/chromestyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
4 changes: 1 addition & 3 deletions libraries/cms/form/field/frontend_language.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,9 @@ protected function getOptions()
}

// Merge any additional options in the XML definition.
$options = array_merge(
return array_merge(
parent::getOptions(),
$languages
);

return $options;
}
}
4 changes: 1 addition & 3 deletions libraries/cms/form/field/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ protected function getOptions()
}

// Merge any additional options in the XML definition.
$options = array_merge(parent::getOptions(), $menus);

return $options;
return array_merge(parent::getOptions(), $menus);
}
}
4 changes: 1 addition & 3 deletions libraries/cms/helper/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down
4 changes: 1 addition & 3 deletions libraries/cms/helper/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down
3 changes: 1 addition & 2 deletions libraries/cms/html/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
4 changes: 1 addition & 3 deletions libraries/cms/html/tel.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ public static function tel($number, $displayplan)
$display[4] = '.e164.arpa';
}

$display = implode($display, '');

return $display;
return implode($display, '');
}
}
3 changes: 1 addition & 2 deletions libraries/cms/html/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
3 changes: 1 addition & 2 deletions libraries/cms/installer/adapter/package.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down
6 changes: 2 additions & 4 deletions libraries/cms/layout/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand All @@ -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);
}
}
8 changes: 2 additions & 6 deletions libraries/cms/library/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand All @@ -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;
}

/**
Expand Down
7 changes: 2 additions & 5 deletions libraries/cms/menu/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -232,9 +231,7 @@ public function getActive()
{
if ($this->_active)
{
$item = &$this->_items[$this->_active];

return $item;
return $this->_items[$this->_active];
}

return;
Expand Down
3 changes: 1 addition & 2 deletions libraries/cms/ucm/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ public function getPrimaryKey($typeId, $contentItemId)
)
);
$db->setQuery($queryccid);
$primaryKey = $db->loadResult();

return $primaryKey;
return $db->loadResult();
}
}
8 changes: 2 additions & 6 deletions libraries/cms/ucm/type.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand All @@ -139,9 +137,7 @@ public function getTypeByAlias($typeAlias = null)

$this->db->setQuery($query);

$type = $this->db->loadObject();

return $type;
return $this->db->loadObject();
}

/**
Expand Down