Conditions | 6 |
Paths | 8 |
Total Lines | 20 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 42 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | public function run(Runner $runner, Client $client, Config $config, Event $event) |
||
14 | { |
||
15 | $runner->dispatch('tarantool.migrate'); |
||
16 | |||
17 | $this->store($client, 'services/'.$config['name']); |
||
18 | |||
19 | $meta = $runner->dispatch('module.meta'); |
||
20 | foreach($meta['jobs'] as $job) { |
||
21 | $this->store($client, 'jobs/'.$job, $config['name']); |
||
22 | } |
||
23 | |||
24 | if($config->offsetExists('events') && is_array($config['events'])) { |
||
25 | foreach($config['events'] as $nick => $listeners) { |
||
26 | $listeners = (array) $listeners; |
||
27 | foreach($listeners as $listener) { |
||
28 | $event->subscribe($nick, $listener); |
||
29 | } |
||
30 | } |
||
31 | } |
||
32 | } |
||
33 | |||
52 |