Code Duplication    Length = 6-6 lines in 2 locations

apps/theming/lib/controller/themingcontroller.php 2 locations

@@ 114-119 (lines=6) @@
111
				Http::STATUS_UNPROCESSABLE_ENTITY);
112
		}
113
		$name = '';
114
		if(!empty($newLogo)) {
115
			$target = $this->rootFolder->newFile('themedinstancelogo');
116
			stream_copy_to_stream(fopen($newLogo['tmp_name'], 'r'), $target->fopen('w'));
117
			$this->template->set('logoMime', $newLogo['type']);
118
			$name = $newLogo['name'];
119
		}
120
		if(!empty($newBackgroundLogo)) {
121
			$target = $this->rootFolder->newFile('themedbackgroundlogo');
122
			stream_copy_to_stream(fopen($newBackgroundLogo['tmp_name'], 'r'), $target->fopen('w'));
@@ 120-125 (lines=6) @@
117
			$this->template->set('logoMime', $newLogo['type']);
118
			$name = $newLogo['name'];
119
		}
120
		if(!empty($newBackgroundLogo)) {
121
			$target = $this->rootFolder->newFile('themedbackgroundlogo');
122
			stream_copy_to_stream(fopen($newBackgroundLogo['tmp_name'], 'r'), $target->fopen('w'));
123
			$this->template->set('backgroundMime', $newBackgroundLogo['type']);
124
			$name = $newBackgroundLogo['name'];
125
		}
126
127
		return new DataResponse(
128
			[