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