Total Complexity | 5 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
13 | final class SetupLightningdQueue20190311144000 extends RabbitMq3Migration |
||
14 | { |
||
15 | public function getDescription(string $direction = self::MIGRATE_UP): string |
||
16 | { |
||
17 | return $direction === self::MIGRATE_UP |
||
18 | ? 'Create RabbitMQ queue for Lightningd messages.' |
||
19 | : 'Delete RabbitMQ queue for Lightningd messages.'; |
||
20 | } |
||
21 | |||
22 | public function isReversible(): bool |
||
23 | { |
||
24 | return true; |
||
25 | } |
||
26 | |||
27 | protected function up(): void |
||
28 | { |
||
29 | $this->declareQueue('lightningd.adapter.messages', false, true, false, false); |
||
30 | $this->bindQueue('lightningd.adapter.messages', 'lightningd.adapter.exchange', 'lightningd.message.#'); |
||
31 | } |
||
32 | |||
33 | protected function down(): void |
||
36 | } |
||
37 | } |
||
38 |