summaryrefslogtreecommitdiff
path: root/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php')
-rw-r--r--vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php b/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php
index 20c890992..9516e0774 100644
--- a/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php
+++ b/vendor/beberlei/assert/lib/Assert/InvalidArgumentException.php
@@ -16,11 +16,22 @@ namespace Assert;
class InvalidArgumentException extends \InvalidArgumentException implements AssertionFailedException
{
+ /**
+ * @var string|null
+ */
private $propertyPath;
+
+ /**
+ * @var mixed
+ */
private $value;
+
+ /**
+ * @var array
+ */
private $constraints;
- public function __construct($message, $code, $propertyPath, $value, array $constraints = [])
+ public function __construct($message, $code, string $propertyPath = null, $value = null, array $constraints = [])
{
parent::__construct($message, $code);
@@ -36,7 +47,7 @@ class InvalidArgumentException extends \InvalidArgumentException implements Asse
* Useful to transport information about the nature of the error
* back to higher layers.
*
- * @return string
+ * @return string|null
*/
public function getPropertyPath()
{
@@ -55,10 +66,8 @@ class InvalidArgumentException extends \InvalidArgumentException implements Asse
/**
* Get the constraints that applied to the failed assertion.
- *
- * @return array
*/
- public function getConstraints()
+ public function getConstraints(): array
{
return $this->constraints;
}