src/ID3v1/Tag.php 1 location
|
@@ 70-77 (lines=8) @@
|
| 67 |
|
* |
| 68 |
|
* @throws InvalidArgumentException An exception is thrown on invalid version arguments |
| 69 |
|
*/ |
| 70 |
|
public function __construct($version = Version::VERSION_11) |
| 71 |
|
{ |
| 72 |
|
if (!in_array($version, Version::values())) { |
| 73 |
|
throw new InvalidArgumentException('Invalid version.'); |
| 74 |
|
} |
| 75 |
|
|
| 76 |
|
$this->version = $version; |
| 77 |
|
} |
| 78 |
|
|
| 79 |
|
/** |
| 80 |
|
* {@inheritdoc} |
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} |