Skip to content

Commit

Permalink
PHPCS2-Autofixers applied (#19173)
Browse files Browse the repository at this point in the history
- Please consider an empty line before the try/foreach statement
- Whitespace found at end of line
- Expected 1 space after "="; 2 found
- Expected 1 space before "="; 0 found
- Please consider an empty line before the return statement;
- Expected 1 newline after opening brace; 2 found
- Blank line found at start of control structure
- Please consider an empty line before the if statement;
- Line indented incorrectly;
  • Loading branch information
photodude authored and wilsonge committed Jan 10, 2018
1 parent ad1b832 commit 7d3a3ef
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId
}

JHtml::_('bootstrap.popover');

return JLayoutHelper::render('joomla.content.associations', $items);
}

Expand Down Expand Up @@ -467,7 +468,7 @@ public static function allowEdit($extensionName, $typeName, $itemId)
}

// Get the extension specific helper method
$helper= self::getExtensionHelper($extensionName);
$helper = self::getExtensionHelper($extensionName);

if (method_exists($helper, 'allowEdit'))
{
Expand Down Expand Up @@ -495,7 +496,7 @@ public static function allowAdd($extensionName, $typeName)
}

// Get the extension specific helper method
$helper= self::getExtensionHelper($extensionName);
$helper = self::getExtensionHelper($extensionName);

if (method_exists($helper, 'allowAdd'))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,25 @@ public function display($tpl = null)
unset($this->activeFilters['state']);
$this->filterForm->removeField('state', 'filter');
}

if (empty($support['category']))
{
unset($this->activeFilters['category_id']);
$this->filterForm->removeField('category_id', 'filter');
}

if ($extensionName !== 'com_menus')
{
unset($this->activeFilters['menutype']);
$this->filterForm->removeField('menutype', 'filter');
}

if (empty($support['level']))
{
unset($this->activeFilters['level']);
$this->filterForm->removeField('level', 'filter');
}

if (empty($support['acl']))
{
unset($this->activeFilters['access']);
Expand Down Expand Up @@ -222,6 +226,7 @@ protected function addToolbar()
JToolbarHelper::custom('associations.purge', 'purge', 'purge', 'COM_ASSOCIATIONS_PURGE', false, false);
JToolbarHelper::custom('associations.clean', 'refresh', 'refresh', 'COM_ASSOCIATIONS_DELETE_ORPHANS', false, false);
}

JToolbarHelper::preferences('com_associations');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ protected function getOptions()
{
$language = $db->quote($this->element['language']);
}

$query->where($db->quoteName('a.language') . ' IN (' . $language . ')');
}

Expand Down
4 changes: 4 additions & 0 deletions administrator/components/com_contact/helpers/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,19 @@ public static function countTagItems(&$items, $extension)
$db = JFactory::getDbo();
$parts = explode('.', $extension);
$section = null;

if (count($parts) > 1)
{
$section = $parts[1];
}

$join = $db->qn('#__contact_details') . ' AS c ON ct.content_item_id=c.id';

if ($section === 'category')
{
$join = $db->qn('#__categories') . ' AS c ON ct.content_item_id=c.id';
}

foreach ($items as $item)
{
$item->count_trashed = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ public function getType($typeName = '')

if (in_array($typeName, $this->itemTypes))
{

switch ($typeName)
{
case 'article':
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_content/models/articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ protected function getListQuery()

// Filter by access level.
$access = $this->getState('filter.access');

if (is_numeric($access))
{
$query->where('a.access = ' . (int) $access);
Expand Down Expand Up @@ -356,6 +357,7 @@ protected function getListQuery()
{
$tagId = ArrayHelper::toInteger($tagId);
$tagId = implode(',', $tagId);

if (!empty($tagId))
{
$hasTag = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public function display($tpl = null)
{
if ($this->getLayout() == 'pagebreak')
{

return parent::display($tpl);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function onCustomFieldsGetTypes()

// Add to cache and return the data
$types_cache[$this->_type . $this->_name] = $types;

return $types;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package Joomla.Administrator
* @subpackage com_fields
*
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package Joomla.Administrator
* @subpackage com_fields
*
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package Joomla.Administrator
* @subpackage com_fields
*
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected function getLanguages()

foreach ($extension->attributes() as $key => $value)
{
$language->$key = (string) $value;
$language->$key = (string) $value;
}

if ($search)
Expand Down
2 changes: 2 additions & 0 deletions administrator/modules/mod_stats_admin/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public static function getStats(&$params)
$query->select('COUNT(id) AS count_users')
->from('#__users');
$db->setQuery($query);

try
{
$users = $db->loadResult();
Expand All @@ -97,6 +98,7 @@ public static function getStats(&$params)
->from('#__content')
->where('state = 1');
$db->setQuery($query);

try
{
$items = $db->loadResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}
$html[] = '</ul>';
$html[] = '</fieldset>';

echo implode('', $html);
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

default:
$icon = null;
$aria = JText::sprintf('JLIB_HTML_GOTO_PAGE', $item->text);
$aria = JText::sprintf('JLIB_HTML_GOTO_PAGE', $item->text);
break;
}

Expand Down

0 comments on commit 7d3a3ef

Please sign in to comment.