1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-06-16 23:11:06 +03:00

Updating code to follow kohana coding standards

This commit is contained in:
Matt Button 2011-01-31 17:27:21 +00:00
parent e52563165c
commit 8fc8ea440e
11 changed files with 79 additions and 81 deletions

View file

@ -4,7 +4,7 @@
* Controller for interacting with minion on the cli
*
* @author Matt Button <matthew@sigswitch.com>
**/
*/
class Controller_Minion extends Controller
{
/**

View file

@ -6,7 +6,7 @@
* that need to be executed in order to reach a target version
*
* @author Matt Button <matthew@sigswitch.com>
**/
*/
class Minion_Migration_Manager {
/**

View file

@ -5,7 +5,7 @@
* Provides a set of utility functions for managing migrations
*
* @author Matt Button <matthew@sigswitch.com>
**/
*/
class Minion_Migration_Util {
/**
@ -81,7 +81,7 @@ class Minion_Migration_Util {
$location = $migration['location'];
$migration = $migration['timestamp'].'_'.$migration['description'];
$location = ! empty($location) ? rtrim($location, '/').'/' : '';
$location = ( ! empty($location)) ? (rtrim($location, '/').'/') : '';
return $location.$migration.EXT;
}

View file

@ -2,7 +2,6 @@
/**
* Interface that all minion tasks must implement
*
*/
abstract class Minion_Task {

View file

@ -3,7 +3,7 @@
/**
* Utility class for Minion
**/
*/
class Minion_Util
{
/**

View file

@ -2,7 +2,7 @@
/**
* Model for managing migrations
**/
*/
class Model_Minion_Migration extends Model
{
/**
@ -308,7 +308,6 @@ class Model_Minion_Migration extends Model
// If the calling script has been lazy and given us a numerically
// indexed array of locations then we need to convert it to a mirrored
// array
//
// We will decide the target version for these within the loop below
elseif ( ! Arr::is_assoc($locations))
{
@ -329,15 +328,15 @@ class Model_Minion_Migration extends Model
$migrations_to_apply = array();
// What follows is a bit of icky code, but there aren't many "nice" ways around it
//
// Basically we need to get a list of migrations that need to be performed, but
// the ordering of the migrations varies depending on whether we're wanting to
// migrate up or migrate down. As such, we can't just apply a generic "order by x"
// condition, we have to run an individual query for each location
//
// Again, icky, but this appears to be the only "sane" way of doing it with multiple
// locations
//
// If you have a better way of doing this, please let me know :)
foreach ($locations as $location => $target)