summaryrefslogtreecommitdiffstats
path: root/system/libraries/Migration.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-06 13:12:15 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-06 13:12:15 +0200
commit968690491f625ddf59a5136b55ae1b9a2cf98a9a (patch)
tree6bc3eff6e8ec3ecae925ac3ff5c9542888f160f4 /system/libraries/Migration.php
parent58dc75471c25f33b059967ffb515eedc08e86a0b (diff)
parent6683c3c872952ae16d98c89ef474e5522897592a (diff)
Merge upstream branch and some changes for better readability
Diffstat (limited to 'system/libraries/Migration.php')
-rw-r--r--system/libraries/Migration.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index ce4683fc1..4391b235d 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');
@@ -108,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, '/').'/';
@@ -178,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));
@@ -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 */