Code Duplication    Length = 8-8 lines in 2 locations

apps/files_sharing/lib/Controller/ShareController.php 2 locations

@@ 154-161 (lines=8) @@
151
	 * Show the authentication page
152
	 * The form has to submit to the authenticate method route
153
	 */
154
	public function showAuthenticate(): TemplateResponse {
155
		$templateParameters = ['share' => $this->share];
156
157
		$event = new GenericEvent(null, $templateParameters);
158
		$this->eventDispatcher->dispatch('OCA\Files_Sharing::loadAdditionalScripts::publicShareAuth', $event);
159
160
		return new TemplateResponse('core', 'publicshareauth', $templateParameters, 'guest');
161
	}
162
163
	/**
164
	 * The template to show when authentication failed
@@ 166-173 (lines=8) @@
163
	/**
164
	 * The template to show when authentication failed
165
	 */
166
	protected function showAuthFailed(): TemplateResponse {
167
		$templateParameters = ['share' => $this->share, 'wrongpw' => true];
168
169
		$event = new GenericEvent(null, $templateParameters);
170
		$this->eventDispatcher->dispatch('OCA\Files_Sharing::loadAdditionalScripts::publicShareAuth', $event);
171
172
		return new TemplateResponse('core', 'publicshareauth', $templateParameters, 'guest');
173
	}
174
175
	protected function verifyPassword(string $password): bool {
176
		return $this->shareManager->checkPassword($this->share, $password);