Code Duplication    Length = 12-12 lines in 2 locations

src/ID3v2/Reader/LanguageTextFrameReader.php 1 location

@@ 96-107 (lines=12) @@
93
     *
94
     * @return string
95
     */
96
    protected function readText()
97
    {
98
        $offset = 4;
99
        $length = $this->getStream()->getSize() - $offset;
100
        if ($length < 1) {
101
            return '';
102
        }
103
104
        $this->getStream()->seek($this->getOffset() + $offset);
105
106
        return $this->getStream()->read($length);
107
    }
108
109
    /**
110
     * Get text.

src/ID3v2/Reader/TextFrameReader.php 1 location

@@ 60-71 (lines=12) @@
57
     *
58
     * @return string
59
     */
60
    protected function readText()
61
    {
62
        $offset = 1;
63
        $length = $this->getStream()->getSize() - $offset;
64
        if ($length < 1) {
65
            return '';
66
        }
67
68
        $this->getStream()->seek($this->getOffset() + $offset);
69
70
        return $this->getStream()->read($length);
71
    }
72
73
    /**
74
     * Get text.