Code Duplication    Length = 5-5 lines in 2 locations

src/storage/factories/ApplicationComponentFactory.php 1 location

@@ 29-33 (lines=5) @@
26
			$applicationComponent->slug = StringUtil::slugify($postValues['title']);
27
			$applicationComponent->component = $postValues['component'];
28
			$applicationComponent->parameters = new \stdClass();
29
			if (isset($postValues['parameterNames'], $postValues['parameterValues'])) {
30
				foreach ($postValues['parameterNames'] as $key => $value) {
31
					$applicationComponent->parameters->$value = $postValues['parameterValues'][$key];
32
				}
33
			}
34
35
			return $applicationComponent;
36
		} else {

src/storage/factories/SitemapItemFactory.php 1 location

@@ 34-38 (lines=5) @@
31
			$sitemapObject->template = $postValues['template'];
32
			$sitemapObject->regex = isset($postValues['regex']);
33
			$sitemapObject->parameters = new \stdClass();
34
			if (isset($postValues['parameterNames'], $postValues['parameterValues'])) {
35
				foreach ($postValues['parameterNames'] as $key => $value) {
36
					$sitemapObject->parameters->$value = $postValues['parameterValues'][$key];
37
				}
38
			}
39
40
			return $sitemapObject;
41
		} else {