summaryrefslogtreecommitdiffstats
path: root/system/libraries/Migration.php
diff options
context:
space:
mode:
authorJonathon Hill <jhill@brandmovers.com>2012-11-12 23:26:36 +0100
committerJonathon Hill <jhill@brandmovers.com>2012-11-12 23:26:36 +0100
commit02ea66eb922ade4646acbbe22be6354ad8916a0f (patch)
tree1844cbd7dbaaa4147d3834212a3f7e82a70939f2 /system/libraries/Migration.php
parent49c5edaf5c1720d17def3f7fec5d0f6e2d546fb5 (diff)
Code style fixes
Signed-off-by: Jonathon Hill <jhill@brandmovers.com>
Diffstat (limited to 'system/libraries/Migration.php')
-rw-r--r--system/libraries/Migration.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index af9e53030..d08afa598 100644
--- a/system/libraries/Migration.php
+++ b/system/libraries/Migration.php
@@ -187,7 +187,7 @@ class CI_Migration {
$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 @@ class CI_Migration {
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 @@ class CI_Migration {
// 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;