| Total Complexity | 7 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class MigrationService |
||
| 6 | { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * @var MigrationRegistryInterface |
||
| 10 | */ |
||
| 11 | protected $registry; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * MigrationService constructor. |
||
| 15 | * |
||
| 16 | * @param MigrationRegistryInterface $registry |
||
| 17 | */ |
||
| 18 | public function __construct(MigrationRegistryInterface $registry) |
||
| 19 | { |
||
| 20 | $this->registry = $registry; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param array $classes |
||
| 25 | * |
||
| 26 | * @throws \Exception |
||
| 27 | * @throws \Psr\Container\ContainerExceptionInterface |
||
| 28 | * @throws \Psr\Container\NotFoundExceptionInterface |
||
| 29 | */ |
||
| 30 | public function upAll(array $classes) |
||
| 31 | { |
||
| 32 | foreach ($classes as $class) { |
||
| 33 | $this->up($class); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @throws \Exception |
||
| 39 | * @throws \Psr\Container\ContainerExceptionInterface |
||
| 40 | * @throws \Psr\Container\NotFoundExceptionInterface |
||
| 41 | */ |
||
| 42 | public function downAll() |
||
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param $class |
||
| 52 | * |
||
| 53 | * @throws \Exception |
||
| 54 | * @throws \Psr\Container\ContainerExceptionInterface |
||
| 55 | * @throws \Psr\Container\NotFoundExceptionInterface |
||
| 56 | */ |
||
| 57 | public function up($class) |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param $class |
||
| 64 | * |
||
| 65 | * @throws \Exception |
||
| 66 | * @throws \Psr\Container\ContainerExceptionInterface |
||
| 67 | * @throws \Psr\Container\NotFoundExceptionInterface |
||
| 68 | */ |
||
| 69 | public function down($class) |
||
| 72 | } |
||
| 73 | } |
||
| 74 |