From 5645479c622eb36cf9869797896dc0921568c4a9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 17 May 2012 14:32:19 +0300 Subject: Clean up the libraries --- system/libraries/Migration.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'system/libraries/Migration.php') diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index ce4683fc1..0a88e6926 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -45,28 +45,28 @@ class CI_Migration { * @var bool */ protected $_migration_enabled = FALSE; - + /** * Path to migration classes * * @var string */ protected $_migration_path = NULL; - + /** * Current migration version * * @var mixed */ protected $_migration_version = 0; - + /** * Database table with migration info * * @var string */ protected $_migration_table = 'migrations'; - + /** * Whether to automatically run migrations * @@ -85,6 +85,7 @@ class CI_Migration { * Initialize Migration Class * * @param array + * @return void */ public function __construct($config = array()) { @@ -96,7 +97,7 @@ class CI_Migration { foreach ($config as $key => $val) { - $this->{'_' . $key} = $val; + $this->{'_'.$key} = $val; } log_message('debug', 'Migrations class initialized'); @@ -340,7 +341,6 @@ class CI_Migration { } sort($files); - return $files; } @@ -384,6 +384,7 @@ class CI_Migration { { return get_instance()->$var; } + } /* End of file Migration.php */ -- cgit v1.2.3-24-g4f1b From d261b1e89c3d4d5191036d5a5660ef6764e593a0 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 2 Jun 2012 11:12:16 +0100 Subject: Replaced `==` with `===` and `!=` with `!==` in /system/libraries --- system/libraries/Migration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/libraries/Migration.php') diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php index 0a88e6926..4391b235d 100644 --- a/system/libraries/Migration.php +++ b/system/libraries/Migration.php @@ -109,7 +109,7 @@ class CI_Migration { } // If not set, set it - $this->_migration_path != '' OR $this->_migration_path = APPPATH.'migrations/'; + $this->_migration_path !== '' OR $this->_migration_path = APPPATH.'migrations/'; // Add trailing slash if not set $this->_migration_path = rtrim($this->_migration_path, '/').'/'; @@ -179,7 +179,7 @@ class CI_Migration { // We now prepare to actually DO the migrations // But first let's make sure that everything is the way it should be - for ($i = $start; $i != $stop; $i += $step) + for ($i = $start; $i !== $stop; $i += $step) { $f = glob(sprintf($this->_migration_path.'%03d_*.php', $i)); -- cgit v1.2.3-24-g4f1b