Completed
Push — master ( c29fe7...c5a2a9 )
by Dmitry
03:44
created

Tester   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 19
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 16 5
1
<?php
2
3
namespace Basis;
4
5
class Tester extends Application
6
{
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