Permalink
Browse files

Code style fixes

Signed-off-by: Jonathon Hill <jhill@brandmovers.com>
  • Loading branch information...
Jonathon Hill
Jonathon Hill committed Nov 12, 2012
1 parent 49c5eda commit 02ea66eb922ade4646acbbe22be6354ad8916a0f
Showing with 6 additions and 5 deletions.
  1. +6 −5 system/libraries/Migration.php
@@ -187,7 +187,7 @@ public function version($target_version)
$migrations = $this->find_migrations();
- if ($target_version > 0 AND ! isset($migrations[$target_version]))
+ if ($target_version > 0 && ! isset($migrations[$target_version]))
{
$this->_error_string = sprintf($this->lang->line('migration_not_found'), $target_version);
return FALSE;
@@ -216,7 +216,7 @@ public function version($target_version)
foreach ($migrations as $number => $file)
{
// Check for sequence gaps
- if ($this->_migration_type === 'sequential' AND $previous !== FALSE AND abs($number - $previous) > 1)
+ if ($this->_migration_type === 'sequential' && $previous !== FALSE && abs($number - $previous) > 1)
{
$this->_error_string = sprintf($this->lang->line('migration_sequence_gap'), $number);
return FALSE;
@@ -241,9 +241,10 @@ public function version($target_version)
// Run migrations that are inside the target range
if (
- ($method === 'up' AND $number > $current_version AND $number <= $target_version) OR
- ($method === 'down' AND $number <= $current_version AND $number > $target_version)
- ) {
+ ($method === 'up' && $number > $current_version && $number <= $target_version) OR
+ ($method === 'down' && $number <= $current_version && $number > $target_version)
+ )
+ {
log_message('debug', 'Migrating '.$method.' from version '.$current_version.' to version '.$number);
call_user_func(array(new $class, $method));
$current_version = $number;

0 comments on commit 02ea66e

Please sign in to comment.