@@ -28,8 +28,9 @@ discard block |
||
28 | 28 | |
29 | 29 | |
30 | 30 | public function traverse() { |
31 | - if ($this->last !== null) $this->data->traverse($this->last); |
|
32 | - else { |
|
31 | + if ($this->last !== null) { |
|
32 | + $this->data->traverse($this->last); |
|
33 | + } else { |
|
33 | 34 | $lastResult = $this->result->pop(); |
34 | 35 | if ($lastResult) { |
35 | 36 | $this->data = new ValueData($lastResult); |
@@ -67,8 +68,7 @@ discard block |
||
67 | 68 | try { |
68 | 69 | $value = $this->data->extract($this->last, $this->autoLookup, $this->traversing); |
69 | 70 | $this->result->processValue($value); |
70 | - } |
|
71 | - catch (\UnexpectedValueException $e) { |
|
71 | + } catch (\UnexpectedValueException $e) { |
|
72 | 72 | $this->processLastUnexpected(); |
73 | 73 | } |
74 | 74 | } |
@@ -77,8 +77,7 @@ discard block |
||
77 | 77 | private function processLastUnexpected() { |
78 | 78 | if (!($this->autoLookup || $this->traversing)) { |
79 | 79 | $this->result->processValue($this->last); |
80 | - } |
|
81 | - else { |
|
80 | + } else { |
|
82 | 81 | $this->result->clear(); |
83 | 82 | $this->result[0] = false; |
84 | 83 | } |