Skip to content

Commit 5ba30a5

Browse files
committed
collapse indexes on error messages
1 parent b5f43cc commit 5ba30a5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Exceptions/ExpectedArrayException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ class ExpectedArrayException extends FromArrayCompilationException
66
{
77
public function __construct($key, $receivedType)
88
{
9-
parent::__construct($key, 'expected array, got: ' . $receivedType);
9+
parent::__construct($key, ' expected array, got: ' . $receivedType);
1010
}
1111
}

src/Exceptions/FromArrayCompilationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ class FromArrayCompilationException extends \Exception
66
{
77
public function __construct($key, $message)
88
{
9-
parent::__construct('[' . $key . '] ' . $message);
9+
parent::__construct('[' . $key . ']' . $message);
1010
}
1111
}

src/Exceptions/MissingArgumentException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ class MissingArgumentException extends FromArrayCompilationException
66
{
77
public function __construct($key)
88
{
9-
parent::__construct($key, 'is missing');
9+
parent::__construct($key, ' is missing');
1010
}
1111
}

0 commit comments

Comments
 (0)