Skip to content

Commit

Permalink
PHPCS2 autofixers applied (#19158)
Browse files Browse the repository at this point in the history
- Expected 0 spaces after opening bracket; 1 found
- No blank line found after control structure
- Expected 1 newline after opening brace; 2 found
  • Loading branch information
photodude authored and wilsonge committed Dec 25, 2017
1 parent be1564a commit d7159df
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugins/captcha/recaptcha/recaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ private function getResponse($privatekey, $remoteip, $response, $challenge = nul
$reCaptcha = new JReCaptcha($privatekey);
$response = $reCaptcha->verifyResponse($remoteip, $response);

if ( !isset($response->success) || !$response->success)
if (!isset($response->success) || !$response->success)
{
// @todo use exceptions here
if (is_array($response->errorCodes))
Expand Down
1 change: 1 addition & 0 deletions plugins/finder/contacts/contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public function onFinderAfterDelete($context, $table)
{
return true;
}

// Remove the items.
return $this->remove($id);
}
Expand Down
2 changes: 2 additions & 0 deletions plugins/finder/tags/tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public function onFinderAfterDelete($context, $table)
{
return true;
}

// Remove the items.
return $this->remove($id);
}
Expand Down Expand Up @@ -185,6 +186,7 @@ public function onFinderChangeState($context, $pks, $value)
{
$this->itemStateChange($pks, $value);
}

// Handle when the plugin is disabled
if ($context === 'com_plugins.plugin' && $value === 0)
{
Expand Down
1 change: 0 additions & 1 deletion plugins/search/categories/categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
{
foreach ($rows as $i => $row)
{

if (searchHelper::checkNoHtml($row, $searchText, array('name', 'title', 'text')))
{
$row->href = ContentHelperRoute::getCategoryRoute($row->slug);
Expand Down
3 changes: 3 additions & 0 deletions plugins/search/content/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
{
$cfwhere[] = 'LOWER(cfv.value) LIKE LOWER(' . $word . ')';
}

$wheres[] = implode(' OR ', $wheres2);
}

Expand Down Expand Up @@ -305,6 +306,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$list = array();
JFactory::getApplication()->enqueueMessage(JText::_('JERROR_AN_ERROR_HAS_OCCURRED'), 'error');
}

$limit -= count($list);

if (isset($list))
Expand Down Expand Up @@ -429,6 +431,7 @@ public function onContentSearch($text, $phrase = '', $ordering = '', $areas = nu
$results = array_merge($results, (array) $new_row);
}
}

return $results;
}

Expand Down
1 change: 1 addition & 0 deletions plugins/system/debug/debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,7 @@ protected function tableToHtml($table, &$hasWarnings)

$html[] = '</tr>';
}

$html[] = '</tbody>';
$html[] = '</table>';

Expand Down
1 change: 1 addition & 0 deletions plugins/system/fields/fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public function onContentPrepareForm(JForm $form, $data)
{
$data['catid'] = $data['id'];
}

if (is_object($data) && isset($data->id))
{
$data->catid = $data->id;
Expand Down
2 changes: 1 addition & 1 deletion plugins/system/p3p/p3p.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function onAfterInitialise()
$header = trim($header);

// Bail out on empty header (why would anyone do that?!).
if ( empty($header) )
if (empty($header))
{
return;
}
Expand Down
2 changes: 2 additions & 0 deletions plugins/user/profile/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,14 @@ public function onUserBeforeSave($user, $isnew, $data)
// Throw an exception if date is not valid.
throw new InvalidArgumentException(JText::_('PLG_USER_PROFILE_ERROR_INVALID_DOB'));
}

if (JDate::getInstance('now') < $date)
{
// Throw an exception if dob is greather than now.
throw new InvalidArgumentException(JText::_('PLG_USER_PROFILE_ERROR_INVALID_DOB_FUTURE_DATE'));
}
}

// Check that the tos is checked if required ie only in registration from frontend.
$task = JFactory::getApplication()->input->getCmd('task');
$option = JFactory::getApplication()->input->getCmd('option');
Expand Down

0 comments on commit d7159df

Please sign in to comment.