From 74ca8a503b18211faad05d34af59ba589948d69f Mon Sep 17 00:00:00 2001 From: Ahmet Kiyak Date: Fri, 10 Jul 2015 15:46:36 +0200 Subject: [PATCH 1/3] Fix wrong error message. if the parameter from get_class is null, it returns the name of outer class. To fix this, we have to check for null. --- src/Entities/Assertions/InstanceAssertion.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Entities/Assertions/InstanceAssertion.php b/src/Entities/Assertions/InstanceAssertion.php index 9424423..43ba023 100644 --- a/src/Entities/Assertions/InstanceAssertion.php +++ b/src/Entities/Assertions/InstanceAssertion.php @@ -109,7 +109,7 @@ public function toCode() \'%s must be an instance of %s, %s found instead.\', \'' . str_replace(ReservedKeywords::RESULT, 'The returned object', $this->operand) . '\', \'' . $this->class . '\', - get_class(' . $this->operand . ') + ' . $this->operand . ' === null ? \'null\' : get_class(' . $this->operand . ') ); }'; } From 04d98df0d243d01d0ce467657c4503da7eab570d Mon Sep 17 00:00:00 2001 From: Ahmet Kiyak Date: Fri, 10 Jul 2015 17:05:53 +0200 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 332b1e0..3672bd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# Version 1.4.8 + +## Bugfixes + +* Fix wrong classname in InstanceAssertion error message + +## Features + +* None # Version 1.4.7 From 67d3901462ef98c15c8c44bfcb3de9fc977c65ac Mon Sep 17 00:00:00 2001 From: Ahmet Kiyak Date: Fri, 10 Jul 2015 17:06:08 +0200 Subject: [PATCH 3/3] Update build.default.properties --- build.default.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.default.properties b/build.default.properties index 53a4cf3..cc24f6d 100644 --- a/build.default.properties +++ b/build.default.properties @@ -8,7 +8,7 @@ #-------------------------------------------------------------------------------- # ---- Module Release Settings -------------------------------------------------- -release.version = 1.4.7 +release.version = 1.4.8 # ---- PHPCPD Settings ---------------------------------------------------------- # Directories