| Conditions | 5 |
| Paths | 16 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | public function __construct($root = null) |
||
| 8 | { |
||
| 9 | if (!$root) { |
||
| 10 | $root = getcwd(); |
||
| 11 | } |
||
| 12 | parent::__construct($root); |
||
| 13 | |||
| 14 | $service = getenv('SERVICE_NAME') ?: basename($root); |
||
| 15 | $host = getenv('TARANTOOL_SERVICE_HOST') ?: '127.0.0.1'; |
||
| 16 | $port = getenv('TARANTOOL_SERVICE_PORT') ?: '3302'; |
||
| 17 | |||
| 18 | $this->get(Config::class)['service'] = $service; |
||
| 19 | $this->get(Config::class)['tarantool'] = "tcp://$host:$port"; |
||
| 20 | |||
| 21 | $this->dispatch('tarantool.migrate'); |
||
| 22 | } |
||
| 23 | } |
||
| 24 |