Code Duplication    Length = 8-8 lines in 2 locations

src/ID3v2/Header.php 1 location

@@ 48-55 (lines=8) @@
45
     *
46
     * @throws InvalidArgumentException An exception is thrown on invalid version arguments
47
     */
48
    public function __construct($version = Version::VERSION_23)
49
    {
50
        if (!in_array($version, Version::values())) {
51
            throw new InvalidArgumentException('Invalid version.');
52
        }
53
54
        $this->version = $version;
55
    }
56
57
    /**
58
     * {@inheritdoc}

src/ID3v1/Tag.php 1 location

@@ 269-276 (lines=8) @@
266
     *
267
     * @throws InvalidArgumentException An exception is thrown on invalid version arguments.
268
     */
269
    public function __construct($version = Version::VERSION_11)
270
    {
271
        if (!in_array($version, Version::values())) {
272
            throw new InvalidArgumentException('Invalid version');
273
        }
274
275
        $this->version = $version;
276
    }
277
278
    /**
279
     * Get version.