diff --git a/libraries/cms/model/actions.php b/libraries/cms/model/actions.php index 9c0e78eb81380..3ddc67c739aad 100644 --- a/libraries/cms/model/actions.php +++ b/libraries/cms/model/actions.php @@ -161,7 +161,7 @@ public function delete($cid) // Get the id's of the items to delete $pks = (array) $cid; - foreach ($pks AS $pk) + foreach ($pks as $pk) { $context = $this->option . '.' . $this->getName(); @@ -329,7 +329,7 @@ public function reorder($cid, $direction) $pks = (array) $cid; - foreach ($pks AS $pk) + foreach ($pks as $pk) { $activeRecord = $this->getActiveRecord($pk); diff --git a/libraries/cms/model/administrator.php b/libraries/cms/model/administrator.php index e2af8675dc7e1..5e29cd735ee75 100644 --- a/libraries/cms/model/administrator.php +++ b/libraries/cms/model/administrator.php @@ -124,7 +124,7 @@ public function loadForm($name, $source = null, $config = array(), $clear = fals */ protected function loadFormData($context = null) { - if(is_null($context)) + if (is_null($context)) { $context = $this->getContext(); } diff --git a/libraries/cms/model/cms.php b/libraries/cms/model/cms.php index 247a82c6424df..77244421fe497 100644 --- a/libraries/cms/model/cms.php +++ b/libraries/cms/model/cms.php @@ -210,15 +210,15 @@ public function allowAction($action, $assetName = null, $activeRecord = null) $user = JFactory::getUser(); - if($action == 'core.edit.own') + if ($action == 'core.edit.own') { // Not a record or isn't tracking ownership - if(is_null($activeRecord) || !isset($activeRecord->owner)) + if (is_null($activeRecord) || !isset($activeRecord->owner)) { $action = 'core.edit'; } // Not the owner so the answer is no - elseif($user->id != $activeRecord->owner && !$user->authorise('core.admin', $assetName)) + elseif ($user->id != $activeRecord->owner && !$user->authorise('core.admin', $assetName)) { return false; } diff --git a/libraries/cms/model/collection.php b/libraries/cms/model/collection.php index 46316ffd9b0b8..cc5f38e085267 100644 --- a/libraries/cms/model/collection.php +++ b/libraries/cms/model/collection.php @@ -51,7 +51,7 @@ public function __construct(JRegistry $state = null, JDatabaseDriver $db = null, // Add the ordering filtering fields white list. if (isset($config['filter_fields'])) { - foreach ($config['filter_fields'] AS $filter_field) + foreach ($config['filter_fields'] as $filter_field) { $hasName = (array_key_exists('name', $filter_field)); $hasDataKey = (array_key_exists('dataKeyName', $filter_field)); @@ -185,7 +185,7 @@ protected function getListQuery(JDatabaseQuery $query = null) $activeFilters = $this->getActiveFilters(); - foreach ($activeFilters AS $dataKeyName => $value) + foreach ($activeFilters as $dataKeyName => $value) { $query->where($dataKeyName . ' = ' . $db->quote($value)); } @@ -491,7 +491,7 @@ protected function populateState($ordering = null, $direction = null) $filters = $app->getUserStateFromRequest($context . '.filter', 'filter', array(), 'array'); - foreach ($filters AS $name => $value) + foreach ($filters as $name => $value) { $this->state->set('filter.' . $name, $value); } diff --git a/libraries/cms/renderer/jlayout.php b/libraries/cms/renderer/jlayout.php index 305fa18400d7a..e9bde73326576 100644 --- a/libraries/cms/renderer/jlayout.php +++ b/libraries/cms/renderer/jlayout.php @@ -27,7 +27,7 @@ class JRendererJlayout implements RendererInterface /** * Public constructor * - * @param array $config An array of configuration options + * @param array $config An array of configuration options * * @since 3.4 */