aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2014-04-01 14:49:16 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2014-04-01 14:49:16 +0200
commitbca8de0d382c81c762c9b2ecebb2ad79d07edf6d (patch)
tree82a0608aacae97d94fba9c462f925040b7e39111
parenteb052f6e46abe7a942a6fa4ba47412fb3f69943e (diff)
parent65ad33fd7da0c3e1d7afdcd6bc30acc1d5dbb52b (diff)
downloadPraspel-bca8de0d382c81c762c9b2ecebb2ad79d07edf6d.zip
Praspel-bca8de0d382c81c762c9b2ecebb2ad79d07edf6d.tar.gz
Praspel-bca8de0d382c81c762c9b2ecebb2ad79d07edf6d.tar.bz2
Merge branch 'iterator' into incoming
-rw-r--r--Iterator/Coverage/Structural.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/Iterator/Coverage/Structural.php b/Iterator/Coverage/Structural.php
index 77c496b..c55d8d7 100644
--- a/Iterator/Coverage/Structural.php
+++ b/Iterator/Coverage/Structural.php
@@ -243,8 +243,17 @@ class Structural implements \Hoa\Iterator\Recursive {
case static::STATE_REQUIRES:
++$this->_key;
- $this->_current = $behavior->getClause('requires');
- $this->_path->push($this->_current);
+
+ if(true === $behavior->clauseExists('requires')) {
+
+ $this->_current = $behavior->getClause('requires');
+ $this->_path->push($this->_current);
+ }
+ else {
+
+ $this->_current = true;
+ $this->_path->push(null);
+ }
if(true === $behavior->clauseExists('behavior')) {
@@ -355,7 +364,7 @@ class Structural implements \Hoa\Iterator\Recursive {
$this->_key = -1;
unset($this->_path);
- $this->_path = new \SplQueue();
+ $this->_path = new \Hoa\Praspel\Iterator\WeakStack();
unset($this->_stack);
$this->_stack = new \SplStack();