From 57dc1c5d0c915d5cfb4be8dd294ec1f1bf39b2c1 Mon Sep 17 00:00:00 2001 From: mikey179 Date: Wed, 17 Jun 2015 13:35:55 +0200 Subject: [PATCH] add stubbles\input\errors\ParamError::details() --- CHANGELOG.md | 6 ++++++ src/main/php/errors/ParamError.php | 12 ++++++++++++ src/test/php/errors/ParamErrorTest.php | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3a7499..40cddfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +5.1.0 (2015-06-17) +------------------ + + * added `stubbles\input\errors\ParamError::details()` + + 5.0.0 (2015-05-28) ------------------ diff --git a/src/main/php/errors/ParamError.php b/src/main/php/errors/ParamError.php index c889eeb..a6db40d 100644 --- a/src/main/php/errors/ParamError.php +++ b/src/main/php/errors/ParamError.php @@ -76,6 +76,18 @@ public function id() return $this->id; } + /** + * returns details of what caused the error + * + * @return array + * @since 5.1.0 + * @XmlIgnore + */ + public function details() + { + return $this->details; + } + /** * fills given list of messages with details * diff --git a/src/test/php/errors/ParamErrorTest.php b/src/test/php/errors/ParamErrorTest.php index 66ac79e..147fc79 100644 --- a/src/test/php/errors/ParamErrorTest.php +++ b/src/test/php/errors/ParamErrorTest.php @@ -40,6 +40,15 @@ public function returnsGivenId() assertEquals('id', $this->paramError->id()); } + /** + * @test + * @since 5.1.0 + */ + public function returnsGivenDetails() + { + assertEquals(['foo' => 'bar'], $this->paramError->details()); + } + /** * @test */