Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit ed6cc45

Browse files
committed
use InvalidArgumentException instead for exception in setCharset
1 parent 01ddf68 commit ed6cc45

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Helper/HeadMeta.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ public function set($value)
463463
* Not valid in a non-HTML5 doctype
464464
*
465465
* @param string $charset
466-
* @param Exception\RuntimeException
466+
* @param Exception\InvalidArgumentException
467467
* @return HeadMeta Provides a fluent interface
468468
*/
469469
public function setCharset($charset)
@@ -475,7 +475,7 @@ public function setCharset($charset)
475475
$item->modifiers = [];
476476

477477
if (! $this->isValid($item)) {
478-
throw new Exception\RuntimeException('XHTML* doctype has no attribute charset; please use appendHttpEquiv()');
478+
throw new Exception\InvalidArgumentException('XHTML* doctype has no attribute charset; please use appendHttpEquiv()');
479479
}
480480

481481
$this->set($item);

test/Helper/HeadMetaTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ public function testCharsetPosition()
442442

443443
public function testCarsetWithXhtmlDoctypeGotException()
444444
{
445-
$this->expectException(Exception\RuntimeException::class);
445+
$this->expectException(Exception\InvalidArgumentException::class);
446446
$this->expectExceptionMessage('XHTML* doctype has no attribute charset; please use appendHttpEquiv()');
447447

448448
$view = new View();

0 commit comments

Comments
 (0)