Skip to content

Commit

Permalink
Code style issues to keep Travis happy.
Browse files Browse the repository at this point in the history
Let it be noted that I disagree with this code style. (int)$x is easier to understand than (int) $x in a long statement.
  • Loading branch information
Nicholas K. Dionysopoulos committed Aug 27, 2014
1 parent f666ff8 commit 22dc712
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function reset()
/** @var PostinstallModelMessages $model */
$model = $this->getThisModel();

$eid = (int)$model->getState('eid', '700', 'int');
$eid = (int) $model->getState('eid', '700', 'int');

if (empty($eid))
{
Expand Down
10 changes: 5 additions & 5 deletions administrator/components/com_postinstall/models/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function getExtensionName($eid)
$query = $db->getQuery(true)
->select(array('name', 'element', 'client_id'))
->from($db->qn('#__extensions'))
->where($db->qn('extension_id') . ' = ' . $db->q((int)$eid));
->where($db->qn('extension_id') . ' = ' . $db->q((int) $eid));

$db->setQuery($query, 0, 1);

Expand Down Expand Up @@ -320,9 +320,9 @@ public function addPostInstallationMessage(array $options)
}

// Normalisation of integer values
$options['extension_id'] = (int)$options['extension_id'];
$options['language_client_id'] = (int)$options['language_client_id'];
$options['enabled'] = (int)$options['enabled'];
$options['extension_id'] = (int) $options['extension_id'];
$options['language_client_id'] = (int) $options['language_client_id'];
$options['enabled'] = (int) $options['enabled'];

// Normalisation of 0/1 values
foreach (array('language_client_id', 'enabled') as $key)
Expand All @@ -331,7 +331,7 @@ public function addPostInstallationMessage(array $options)
}

// Make sure there's an extension_id
if (!(int)$options['extension_id'])
if (!(int) $options['extension_id'])
{
throw new Exception('Post-installation message definitions need an extension_id', 500);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected function onBrowse($tpl = null)
/** @var PostinstallModelMessages $model */
$model = $this->getModel();

$this->eid = (int)$model->getState('eid', '700', 'int');
$this->eid = (int) $model->getState('eid', '700', 'int');

if (empty($this->eid))
{
Expand Down

0 comments on commit 22dc712

Please sign in to comment.