Code Duplication    Length = 7-7 lines in 2 locations

Classes/MOC/NotFound/ViewHelpers/RequestViewHelper.php 2 locations

@@ 125-131 (lines=7) @@
122
		if ($this->supportEmptySegmentForDimensions) {
123
			foreach ($firstUriPartExploded as $uriSegment) {
124
				$uriSegmentIsValid = false;
125
				foreach ($dimensionPresets as $dimensionName => $dimensionPreset) {
126
					$preset = $this->contentDimensionPresetSource->findPresetByUriSegment($dimensionName, $uriSegment);
127
					if ($preset !== null) {
128
						$uriSegmentIsValid = true;
129
						break;
130
					}
131
				}
132
				if (!$uriSegmentIsValid) {
133
					return;
134
				}
@@ 140-146 (lines=7) @@
137
			if (count($firstUriPartExploded) === count($dimensionPresets)) {
138
				return;
139
			}
140
			foreach ($dimensionPresets as $dimensionName => $dimensionPreset) {
141
				$uriSegment = array_shift($firstUriPartExploded);
142
				$preset = $this->contentDimensionPresetSource->findPresetByUriSegment($dimensionName, $uriSegment);
143
				if ($preset === null) {
144
					return;
145
				}
146
			}
147
		}
148
149
		$path = $matches['firstUriPart'] . '/' . $path;