Code Duplication    Length = 21-23 lines in 2 locations

src/Migration/RabbitMq3MigrationTrait.php 2 locations

@@ 71-93 (lines=23) @@
68
        $this->deleteQueue($repubQueue);
69
    }
70
71
    private function declareExchange(
72
        string $exchange,
73
        string $type,
74
        bool $passive = false,
75
        bool $durable = false,
76
        bool $autoDelete = true,
77
        bool $internal = false,
78
        bool $noWait = false,
79
        array $arguments = []
80
    ): void {
81
        $uri = sprintf('/api/exchanges/%s/%s', $this->getVhost(), $exchange);
82
        $this->connector->getConnection()->put($uri, [
83
            'body' => json_encode([
84
                'type' => $type,
85
                'passive' => $passive,
86
                'durable' => $durable,
87
                'auto_delete' => $autoDelete,
88
                'internal' => $internal,
89
                'nowait' => $noWait,
90
                'arguments' => $arguments
91
            ])
92
        ]);
93
    }
94
95
    private function bindExchange(
96
        string $source,
@@ 118-138 (lines=21) @@
115
        $this->connector->getConnection()->delete($uri);
116
    }
117
118
    private function declareQueue(
119
        string $queue,
120
        bool $passive = false,
121
        bool $durable = false,
122
        bool $exclusive = false,
123
        bool $autoDelete = true,
124
        bool $noWait = false,
125
        array $arguments = []
126
    ): void {
127
        $uri = sprintf('/api/queues/%s/%s', $this->getVhost(), $queue);
128
        $this->connector->getConnection()->put($uri, [
129
            'body' => json_encode([
130
                'passive' => $passive,
131
                'durable' => $durable,
132
                'exclusive' => $exclusive,
133
                'auto_delete' => $autoDelete,
134
                'nowait' => $noWait,
135
                'arguments' => $arguments
136
            ])
137
        ]);
138
    }
139
140
    private function bindQueue(
141
        string $queue,