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

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