Skip to content

Commit

Permalink
PHPCS cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Aug 7, 2013
1 parent be39809 commit bac5019
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion fields/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ protected function getLabel()
$update = $data->$stability;
}


// Message containing the version
if (version_compare(JVERSION, '3.0', 'ge'))
{
Expand All @@ -109,11 +108,13 @@ protected function getLabel()
{
$message .= ' ' . JText::_('MOD_TWEETDISPLAYBACK_VERSION_FAILED') . $close;
}

// If an update is available, and compatible with the current Joomla! version, notify the user
elseif (version_compare($update->version, $version, 'gt') && version_compare(JVERSION, $update->jversion, 'ge'))
{
$message .= ' <a href="' . $update->notice . '" target="_blank">' . JText::sprintf('MOD_TWEETDISPLAYBACK_VERSION_UPDATE', $update->version) . '</a></label>';
}

// No updates, or the Joomla! version is not compatible, so let the user know they're using the current version
else
{
Expand Down
8 changes: 6 additions & 2 deletions helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ public function compileData()

return $this->twitter;
}

// Make sure we've got an array of data
elseif (is_array($obj))
{
Expand Down Expand Up @@ -331,6 +332,7 @@ public function compileFromCache()
$this->twitter['error']['messages'][] = $error->message;
}
}

// Make sure we've got an array of data
elseif (is_array($obj))
{
Expand Down Expand Up @@ -402,7 +404,6 @@ public function getJSON($req)
// Render from the cached data
$this->bearer = file_get_contents($cacheFile);
}

}

$headers = array(
Expand Down Expand Up @@ -490,6 +491,7 @@ protected function prepareUser()

return;
}

// Check that we have the JSON, otherwise set an error
elseif (!$obj)
{
Expand Down Expand Up @@ -540,7 +542,7 @@ protected function prepareUser()
// Append the list name if being pulled
if ($feed == 'list')
{
$this->twitter['header']->user .= ' - <a href="' . $scheme .'twitter.com/' . $uname . '/' . $flist . '" rel="nofollow">' . $list . ' list</a>';
$this->twitter['header']->user .= ' - <a href="' . $scheme . 'twitter.com/' . $uname . '/' . $flist . '" rel="nofollow">' . $list . ' list</a>';
}
}

Expand Down Expand Up @@ -815,6 +817,7 @@ protected function processItem($o, $i)
{
$userURL = $scheme . 'twitter.com/intent/user?screen_name=' . $tweetedBy;
}

$this->twitter['tweets']->$i->user = '<strong><a href="' . $userURL . '" rel="nofollow">' . $tweetedBy . '</a>' . $this->params->get('tweetUserSeparator') . '</strong>';
}

Expand Down Expand Up @@ -941,6 +944,7 @@ protected function processItem($o, $i)
{
$mentionURL = $scheme . 'twitter.com/intent/user?screen_name=' . $mention->screen_name;
}

$this->twitter['tweets']->$i->text = str_ireplace('@' . $mention->screen_name, '@<a class="userlink" href="' . $mentionURL . '" rel="nofollow">' . $mention->screen_name . '</a>', $this->twitter['tweets']->$i->text);
}

Expand Down

0 comments on commit bac5019

Please sign in to comment.