Skip to content

Commit

Permalink
Merge pull request #28 from localheinz/fix/exception
Browse files Browse the repository at this point in the history
Fix: Use corresponding parameter in exception message
  • Loading branch information
localheinz authored Jan 27, 2018
2 parents 12c6623 + 8f0585b commit 511d004
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Format/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(int $jsonEncodeOptions, string $indent, bool $hasFin
if (0 > $jsonEncodeOptions) {
throw new \InvalidArgumentException(\sprintf(
'"%s" is not valid options for json_encode().',
$indent
$jsonEncodeOptions
));
}

Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Format/FormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testConstructorRejectsInvalidEncodeOptions(): void
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage(\sprintf(
'"%s" is not valid options for json_encode().',
$indent
$jsonEncodeOptions
));

new Format(
Expand Down

0 comments on commit 511d004

Please sign in to comment.