Code Duplication    Length = 13-17 lines in 2 locations

src/Loco.php 2 locations

@@ 162-178 (lines=17) @@
159
    /**
160
     * {@inheritdoc}
161
     */
162
    public function export(MessageCatalogueInterface $catalogue)
163
    {
164
        $locale = $catalogue->getLocale();
165
        foreach ($this->projectsByDomain as $domain => $project) {
166
            try {
167
                $data = $this->client->export()->locale(
168
                    $project->getApiKey(),
169
                    $locale,
170
                    'xliff',
171
                    ['format' => 'symfony', 'status' => 'translated', 'index' => $project->getIndexParameter()]
172
                );
173
174
                $catalogue->addCatalogue(XliffConverter::contentToCatalogue($data, $locale, $domain));
175
            } catch (NotFoundException $e) {
176
            }
177
        }
178
    }
179
180
    /**
181
     * {@inheritdoc}
@@ 183-195 (lines=13) @@
180
    /**
181
     * {@inheritdoc}
182
     */
183
    public function import(MessageCatalogueInterface $catalogue)
184
    {
185
        $locale = $catalogue->getLocale();
186
        foreach ($this->projectsByDomain as $domain => $project) {
187
            $data = XliffConverter::catalogueToContent($catalogue, $domain);
188
            $this->client->import()->import(
189
                $project->getApiKey(),
190
                'xliff',
191
                $data,
192
                ['locale' => $locale, 'async' => 1, 'index' => $project->getIndexParameter()]
193
            );
194
        }
195
    }
196
197
    private function getProject($domain): LocoProject
198
    {