| Conditions | 8 |
| Paths | 24 |
| Total Lines | 26 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 72 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | public function run(Runner $runner, Client $client, Config $config, Event $event) |
||
|
|
|||
| 13 | { |
||
| 14 | $runner->dispatch('tarantool.migrate'); |
||
| 15 | |||
| 16 | $client->setRoot('services'); |
||
| 17 | if(!$client->get($config['name'])) { |
||
| 18 | $client->set($config['name']); |
||
| 19 | } |
||
| 20 | |||
| 21 | $client->setRoot('jobs'); |
||
| 22 | $meta = $runner->dispatch('module.meta'); |
||
| 23 | foreach($meta['jobs'] as $job) { |
||
| 24 | if(!$client->get($job)) { |
||
| 25 | $client->set($job, $config['name']); |
||
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 29 | if($config->offsetExists('events') && is_array($config['events'])) { |
||
| 30 | foreach($config['events'] as $event => $listeners) { |
||
| 31 | $listeners = (array) $listeners; |
||
| 32 | foreach($listeners as $listener) { |
||
| 33 | $event->subscribe($event, $listener); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |
||
| 37 | } |
||
| 38 | } |
||
| 39 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.