Code Duplication    Length = 10-13 lines in 3 locations

src/Client/Encoding/EncodingConverter.php 3 locations

@@ 81-91 (lines=11) @@
78
     *
79
     * @return string|false
80
     */
81
    public function intl()
82
    {
83
        try {
84
            $uConverter = new \UConverter(self::ENCODING, $this->encoding);
85
            $converted = $uConverter->convert($this->string);
86
        } catch (\Exception $e) {
87
            return false;
88
        }
89
        mb_internal_encoding(self::ENCODING);
90
        return $converted;
91
    }
92
93
    /**
94
     * iconv
@@ 100-109 (lines=10) @@
97
     * @param string $outSuffix
98
     * @return string|false
99
     */
100
    public function iconv($outSuffix = '//TRANSLIT//IGNORE')
101
    {
102
        try {
103
            $converted = iconv($this->encoding, self::ENCODING . $outSuffix, $this->string);
104
        } catch (\Exception $e) {
105
            return false;
106
        }
107
        mb_internal_encoding(self::ENCODING);
108
        return $converted;
109
    }
110
111
    /**
112
     * xml
@@ 117-129 (lines=13) @@
114
     *
115
     * @return string|false
116
     */
117
    public function xml()
118
    {
119
        if (strtoupper($this->encoding) !== 'ISO-8859-1') {
120
            return false;
121
        }
122
        try {
123
            $converted = utf8_encode($this->string);
124
        } catch (\Exception $e) {
125
            return false;
126
        }
127
        mb_internal_encoding(self::ENCODING);
128
        return $converted;
129
    }
130
131
    /**
132
     * mbstring