Code Duplication    Length = 15-16 lines in 2 locations

src/Driver/Yandex.php 1 location

@@ 28-42 (lines=15) @@
25
26
        $lines = $sp->split($text, 512);
27
        $content = '';
28
        foreach ($lines as $line) {
29
            $query = [
30
                'format'    => 'mp3',
31
                'lang'       => $this->getLanguage(),
32
                'quality'   => 'hi',
33
                'text'      => $line,
34
                'speaker'   => 'omazh', // jane, omazh, zahar, ermil
35
                'mixed'   => 'mixed', // good (доброжелательный), neutral(нейтральный), evil (злой), mixed (переменная окраска).
36
                //'drunk' => 'true',
37
                //'robot' => 'true',
38
                //'ill'   => 'true',
39
                'key'       => '7dc83e6f-7a54-4fac-a651-0ef471177aa3'
40
            ];
41
            $content .= $this->reguestGet($query);
42
        }
43
        return $content;
44
    }
45

src/Yandex.php 1 location

@@ 58-73 (lines=16) @@
55
56
        $lines = $sp->split($text, 512);
57
        $content = '';
58
        foreach ($lines as $line) {
59
            $query = [
60
                'format'    => 'mp3',
61
                'quality'   => 'hi',
62
                'text'      => $line,
63
                'speaker'   => $this->speaker, // jane, omazh, zahar, ermil
64
                'emotion'   => 'good', // neutral (доброжелательный), neutral(нейтральный), evil (злой).
65
                'lang'      => 'ru‑RU',
66
                'speed'     => 1.2,
67
                //'drunk' => 'true',
68
                //'robot' => 'true',
69
                //'ill'   => 'true',
70
                'key'       => $this->apiKey
71
            ];
72
            $content .= $this->reguestGet($query);
73
        }
74
        file_put_contents($outFile, $content);
75
        return true;
76
    }