Completed
Push — master ( f97a49...281390 )
by Dmitry
10:44
created

Bootstrap   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 13
ccs 0
cts 9
cp 0
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Basis\Jobs\Module;
4
5
use Basis\Config;
6
use Basis\Runner;
7
use LinkORB\Component\Etcd\Client;
8
9
class Bootstrap
10
{
11
    public function run(Runner $runner, Client $client, Config $config)
12
    {
13
        $runner->dispatch('tarantool.migrate');
14
15
        $client->setRoot('services');
16
        if(!$client->get($config['name'])) {
17
            $client->set($config['name'])
18
        }
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected '}'
Loading history...
19
        $client->setRoot('jobs');
20
        $meta = $runner->dispatch('module.meta');
21
        foreach($meta['jobs'] as $job) {
22
            if(!$client->get($job)) {
23
                $client->set($job, $config['name']);
24
            }
25
        }
26
    }
27
}
28