Code Duplication    Length = 8-8 lines in 2 locations

src/ID3v2/Filter/CharsetFilter.php 2 locations

@@ 57-64 (lines=8) @@
54
     *
55
     * @return string
56
     */
57
    public function encode($string, $encoding = Encoding::UTF_8)
58
    {
59
        if ($encoding === $this->encoding) {
60
            return $string;
61
        }
62
63
        return iconv(static::$encodings[$this->encoding], static::$encodings[$encoding], $string);
64
    }
65
66
    /**
67
     * Decode string.
@@ 74-81 (lines=8) @@
71
     *
72
     * @return string
73
     */
74
    public function decode($string, $encoding = Encoding::UTF_8)
75
    {
76
        if ($encoding === $this->encoding) {
77
            return $string;
78
        }
79
80
        return iconv(static::$encodings[$encoding], static::$encodings[$this->encoding], $string);
81
    }
82
}
83