diff --git a/components/com_banners/models/banners.php b/components/com_banners/models/banners.php index 6aea1f3ac8d72..c8524ceaf25da 100644 --- a/components/com_banners/models/banners.php +++ b/components/com_banners/models/banners.php @@ -120,7 +120,7 @@ protected function getListQuery() $query->where($categoryEquals); } } - elseif ((is_array($categoryId)) && (count($categoryId) > 0)) + elseif (is_array($categoryId) && (count($categoryId) > 0)) { $categoryId = ArrayHelper::toInteger($categoryId); $categoryId = implode(',', $categoryId); diff --git a/components/com_config/model/cms.php b/components/com_config/model/cms.php index f6966288ab1a2..352d7e61a857b 100644 --- a/components/com_config/model/cms.php +++ b/components/com_config/model/cms.php @@ -218,8 +218,8 @@ protected function cleanCache($group = null, $client_id = 0) $dispatcher = JEventDispatcher::getInstance(); $options = array( - 'defaultgroup' => ($group) ? $group : (isset($this->option) ? $this->option : JFactory::getApplication()->input->get('option')), - 'cachebase' => ($client_id) ? JPATH_ADMINISTRATOR . '/cache' : $conf->get('cache_path', JPATH_SITE . '/cache')); + 'defaultgroup' => $group ? $group : (isset($this->option) ? $this->option : JFactory::getApplication()->input->get('option')), + 'cachebase' => $client_id ? JPATH_ADMINISTRATOR . '/cache' : $conf->get('cache_path', JPATH_SITE . '/cache')); $cache = JCache::getInstance('callback', $options); $cache->clean(); diff --git a/components/com_contact/helpers/legacyrouter.php b/components/com_contact/helpers/legacyrouter.php index a18c9e03cac85..ca82eb6ad76ef 100644 --- a/components/com_contact/helpers/legacyrouter.php +++ b/components/com_contact/helpers/legacyrouter.php @@ -70,8 +70,8 @@ public function build(&$query, &$segments) $menuItem = $this->router->menu->getItem($query['Itemid']); } - $mView = (empty($menuItem->query['view'])) ? null : $menuItem->query['view']; - $mId = (empty($menuItem->query['id'])) ? null : $menuItem->query['id']; + $mView = empty($menuItem->query['view']) ? null : $menuItem->query['view']; + $mId = empty($menuItem->query['id']) ? null : $menuItem->query['id']; if (isset($query['view'])) { @@ -86,7 +86,7 @@ public function build(&$query, &$segments) } // Are we dealing with a contact that is attached to a menu item? - if (isset($view) && ($mView == $view) and (isset($query['id'])) and ($mId == (int) $query['id'])) + if (isset($view) && ($mView == $view) and isset($query['id']) and ($mId == (int) $query['id'])) { unset($query['view']); unset($query['catid']); @@ -223,7 +223,7 @@ public function parse(&$segments, &$vars) $contactCategory = JCategories::getInstance('Contact')->get($id); - $categories = ($contactCategory) ? $contactCategory->getChildren() : array(); + $categories = $contactCategory ? $contactCategory->getChildren() : array(); $vars['catid'] = $id; $vars['id'] = $id; $found = 0; diff --git a/components/com_content/models/article.php b/components/com_content/models/article.php index e944c87ab59e8..165e38c187d7d 100644 --- a/components/com_content/models/article.php +++ b/components/com_content/models/article.php @@ -164,7 +164,7 @@ public function getItem($pk = null) } // Check for published state if filter set. - if (((is_numeric($published)) || (is_numeric($archived))) && (($data->state != $published) && ($data->state != $archived))) + if ((is_numeric($published) || is_numeric($archived)) && (($data->state != $published) && ($data->state != $archived))) { return JError::raiseError(404, JText::_('COM_CONTENT_ERROR_ARTICLE_NOT_FOUND')); } @@ -330,7 +330,7 @@ public function storeVote($pk = 0, $rate = 0) } else { - if ($userIP != ($rating->lastip)) + if ($userIP != $rating->lastip) { $query = $db->getQuery(true); diff --git a/components/com_content/models/articles.php b/components/com_content/models/articles.php index 1b9652b00323d..058fd387419f5 100644 --- a/components/com_content/models/articles.php +++ b/components/com_content/models/articles.php @@ -503,7 +503,7 @@ protected function getListQuery() } // Process the filter for list views with user-entered filters - if ((is_object($params)) && ($params->get('filter_field') != 'hide') && ($filter = $this->getState('list.filter'))) + if (is_object($params) && ($params->get('filter_field') != 'hide') && ($filter = $this->getState('list.filter'))) { // Clean filter variable $filter = StringHelper::strtolower($filter); diff --git a/components/com_content/views/archive/tmpl/default_items.php b/components/com_content/views/archive/tmpl/default_items.php index 04c75b34b108f..84703eb98a397 100644 --- a/components/com_content/views/archive/tmpl/default_items.php +++ b/components/com_content/views/archive/tmpl/default_items.php @@ -29,7 +29,7 @@ get('show_author') && !empty($item->author )) : ?>