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
				}
@@ 141-147 (lines=7) @@
138
				$this->appendDefaultDimensionPresetUriSegments($dimensionPresets, $path);
139
				return;
140
			}
141
			foreach ($dimensionPresets as $dimensionName => $dimensionPreset) {
142
				$uriSegment = array_shift($firstUriPartExploded);
143
				$preset = $this->contentDimensionPresetSource->findPresetByUriSegment($dimensionName, $uriSegment);
144
				if ($preset === null) {
145
					return;
146
				}
147
			}
148
		}
149
150
		$path = $matches['firstUriPart'] . '/' . $path;