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:
parent
e52563165c
commit
8fc8ea440e
|
@ -4,7 +4,7 @@
|
|||
* Controller for interacting with minion on the cli
|
||||
*
|
||||
* @author Matt Button <matthew@sigswitch.com>
|
||||
**/
|
||||
*/
|
||||
class Controller_Minion extends Controller
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -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 {
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
/**
|
||||
* Interface that all minion tasks must implement
|
||||
*
|
||||
*/
|
||||
abstract class Minion_Task {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/**
|
||||
* Utility class for Minion
|
||||
**/
|
||||
*/
|
||||
class Minion_Util
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue