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

@@ 69-76 (lines=8) @@
66
     *
67
     * @throws InvalidArgumentException An exception is thrown on invalid version arguments
68
     */
69
    public function __construct($version = Version::VERSION_11)
70
    {
71
        if (!in_array($version, Version::values())) {
72
            throw new InvalidArgumentException('Invalid version.');
73
        }
74
75
        $this->version = $version;
76
    }
77
78
    /**
79
     * {@inheritdoc}