Code Duplication    Length = 10-10 lines in 2 locations

src/ID3v1/Metadata.php 1 location

@@ 42-51 (lines=10) @@
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function exists()
43
    {
44
        if ($this->stream->getSize() < 128) {
45
            return false;
46
        }
47
48
        $this->stream->seek(-128, SEEK_END);
49
50
        return 'TAG' === $this->stream->read(3);
51
    }
52
53
    /**
54
     * {@inheritdoc}

src/ID3v2/Metadata.php 1 location

@@ 49-58 (lines=10) @@
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function exists()
50
    {
51
        if ($this->stream->getSize() < 10) {
52
            return false;
53
        }
54
55
        $this->stream->seek(0);
56
57
        return 'ID3' === $this->stream->read(3);
58
    }
59
60
    /**
61
     * {@inheritdoc}