Conditions | 4 |
Paths | 6 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 4 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function run(Runner $runner, Service $service, Event $event) |
||
16 | { |
||
17 | $runner->dispatch('tarantool.migrate'); |
||
18 | |||
19 | $meta = $runner->dispatch('module.meta'); |
||
20 | foreach ($meta['jobs'] as $job) { |
||
21 | $class = new ReflectionClass($runner->getJobClass($job)); |
||
22 | $params = []; |
||
23 | foreach ($class->getProperties(ReflectionProperty::IS_PUBLIC) as $property) { |
||
24 | $params[] = $property->getName(); |
||
25 | } |
||
26 | $service->registerJob($job, $params); |
||
27 | } |
||
28 | |||
29 | foreach ($event->getSubscription() as $event => $listeners) { |
||
30 | $service->subscribe($event); |
||
31 | } |
||
32 | |||
33 | $assets = $runner->dispatch('module.assets'); |
||
34 | $service->updateAssetsVersion($assets['hash']); |
||
35 | } |
||
36 | } |
||
37 |