Skip to content

Commit

Permalink
Remove unnecessary parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmayer committed Oct 2, 2016
1 parent f7ed1bd commit 20cec49
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion administrator/components/com_finder/controllers/filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function save($key = null, $urlVar = null)
// Push up to three validation messages out to the user.
for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)
{
if (($errors[$i]) instanceof Exception)
if ($errors[$i] instanceof Exception)
{
$app->enqueueMessage($errors[$i]->getMessage(), 'warning');
}
Expand Down
4 changes: 2 additions & 2 deletions components/com_finder/helpers/route.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public static function getSearchRoute($f = null, $q = null)
$item = self::getItemid($query);

// Get the base route.
$uri = clone(JUri::getInstance('index.php?option=com_finder&view=search'));
$uri = clone JUri::getInstance('index.php?option=com_finder&view=search');

// Add the pre-defined search filter if present.
if ($f !== null)
Expand Down Expand Up @@ -73,7 +73,7 @@ public static function getAdvancedRoute($f = null, $q = null)
$item = self::getItemid($query);

// Get the base route.
$uri = clone(JUri::getInstance('index.php?option=com_finder&view=advanced'));
$uri = clone JUri::getInstance('index.php?option=com_finder&view=advanced');

// Add the pre-defined search filter if present.
if ($q !== null)
Expand Down
14 changes: 7 additions & 7 deletions components/com_finder/models/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ protected function getListQuery()
// Use the cached data if possible.
if ($this->retrieve($store, false))
{
return clone($this->retrieve($store, false));
return clone $this->retrieve($store, false);
}

// Set variables
Expand Down Expand Up @@ -306,7 +306,7 @@ protected function getListQuery()
$this->store($store, $query, false);

// Return a copy of the query object.
return clone($this->retrieve($store, false));
return clone $this->retrieve($store, false);
}

/**
Expand Down Expand Up @@ -342,7 +342,7 @@ protected function getResultsTotal()
if (empty($this->includedTerms))
{
// Adjust the query to join on the appropriate mapping table.
$query = clone($base);
$query = clone $base;
$query->clear('select')
->select('COUNT(DISTINCT l.link_id)');

Expand Down Expand Up @@ -415,7 +415,7 @@ protected function getResultsTotal()
else
{
// Adjust the query to join on the appropriate mapping table.
$query = clone($base);
$query = clone $base;
$query->join('INNER', '#__finder_links_terms' . $suffix . ' AS m ON m.link_id = l.link_id')
->where('m.term_id IN (' . implode(',', $ids) . ')');

Expand Down Expand Up @@ -526,7 +526,7 @@ protected function getResultsTotal()
$suffix = JString::substr(md5(JString::substr($token, 0, 1)), 0, 1);

// Adjust the query to join on the appropriate mapping table.
$query = clone($base);
$query = clone $base;
$query->join('INNER', '#__finder_links_terms' . $suffix . ' AS m ON m.link_id = l.link_id')
->where('m.term_id IN (' . implode(',', $required) . ')');

Expand Down Expand Up @@ -694,7 +694,7 @@ protected function getResultsData()
else
{
// Adjust the query to join on the appropriate mapping table.
$query = clone($base);
$query = clone $base;
$query->join('INNER', $this->_db->quoteName('#__finder_links_terms' . $suffix) . ' AS m ON m.link_id = l.link_id')
->where('m.term_id IN (' . implode(',', $ids) . ')');

Expand Down Expand Up @@ -847,7 +847,7 @@ protected function getResultsData()
$suffix = JString::substr(md5(JString::substr($token, 0, 1)), 0, 1);

// Adjust the query to join on the appropriate mapping table.
$query = clone($base);
$query = clone $base;
$query->join('INNER', $this->_db->quoteName('#__finder_links_terms' . $suffix) . ' AS m ON m.link_id = l.link_id')
->where('m.term_id IN (' . implode(',', $required) . ')');

Expand Down

0 comments on commit 20cec49

Please sign in to comment.