Code Duplication    Length = 4-5 lines in 2 locations

src/Parser/Value.php 2 locations

@@ 49-53 (lines=5) @@
46
			}
47
48
			if ($token['type'] === Tokenizer::DOT) {
49
				if ($last !== null) {
50
					if (isset($data->$last)) $data = $data->$last;
51
					else if (is_array($data) && isset($data[$last])) $data = $data[$last];
52
				}
53
				else $data = array_pop($result);
54
55
				$last = null;
56
			}
@@ 87-90 (lines=4) @@
84
					$result = $this->processValue($result, $mode, $this->data->$last($token['value'], $element));
85
86
					foreach ($result as $i => $value) {
87
						if (is_array($data)) {
88
							if (isset($data[$value])) $result[$i] = $data[$value];
89
						}
90
						else if (is_scalar($value) && isset($data->$value)) $result[$i] = $data->$value;
91
					}
92
					$last = null;
93
				}