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

Bootstrap::run()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 10
ccs 0
cts 9
cp 0
rs 9.4285
c 1
b 0
f 0
cc 2
eloc 6
nc 2
nop 3
crap 6
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