aboutsummaryrefslogtreecommitdiffstats
path: root/AssertionChecker
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2013-11-21 16:27:52 +0100
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2013-11-21 16:27:52 +0100
commit1d3d606b8c255c1bcaf4a49031866605898d20f6 (patch)
treefb5fb73a1ec18a1bfc691ff899e1ddf3a9a8ac3c /AssertionChecker
parent9c609da1109b4f83622f4b7b527ef730e7a4d2d8 (diff)
downloadPraspel-1d3d606b8c255c1bcaf4a49031866605898d20f6.zip
Praspel-1d3d606b8c255c1bcaf4a49031866605898d20f6.tar.gz
Praspel-1d3d606b8c255c1bcaf4a49031866605898d20f6.tar.bz2
Don't check invariant before invoking constructor.
Diffstat (limited to 'AssertionChecker')
-rw-r--r--AssertionChecker/Runtime.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/AssertionChecker/Runtime.php b/AssertionChecker/Runtime.php
index b28ae2a..0dc12a7 100644
--- a/AssertionChecker/Runtime.php
+++ b/AssertionChecker/Runtime.php
@@ -155,7 +155,9 @@ class Runtime extends AssertionChecker {
);
// Check invariant.
- if(true === $specification->clauseExists('invariant')) {
+ if( true === $specification->clauseExists('invariant')
+ && !( $reflection instanceof \ReflectionMethod
+ && '__construct' === $reflection->getName())) {
$attributes = $this->getAttributeData($callable);
$invariant = $specification->getClause('invariant');