Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | 149 | public function run($migration_file, MigrationContext $context) |
|
37 | { |
||
38 | 149 | $closure = require $migration_file; |
|
39 | |||
40 | 149 | if ( !is_callable($closure) ) { |
|
41 | 1 | throw new \LogicException('The "' . basename($migration_file) . '" migration doesn\'t return a closure.'); |
|
42 | } |
||
43 | |||
44 | 148 | call_user_func($closure, $context); |
|
45 | 148 | } |
|
46 | |||
65 |