Code Duplication    Length = 5-6 lines in 3 locations

lib/Command/CirclesRemote.php 3 locations

@@ 164-168 (lines=5) @@
161
	 */
162
	private function requestInstance(string $host): void {
163
		$webfinger = $this->getWebfinger($host, Application::APP_SUBJECT);
164
		if ($this->input->getOption('all')) {
165
			$this->output->writeln('- Webfinger on <info>' . $host . '</info>');
166
			$this->output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
167
			$this->output->writeln('');
168
		}
169
170
		if ($this->input->getOption('all')) {
171
			$circleLink = $this->extractLink(Application::APP_REL, $webfinger);
@@ 170-175 (lines=6) @@
167
			$this->output->writeln('');
168
		}
169
170
		if ($this->input->getOption('all')) {
171
			$circleLink = $this->extractLink(Application::APP_REL, $webfinger);
172
			$this->output->writeln('- Information about Circles app on <info>' . $host . '</info>');
173
			$this->output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
174
			$this->output->writeln('');
175
		}
176
177
		$this->output->writeln('- Available services on <info>' . $host . '</info>');
178
		foreach ($webfinger->getLinks() as $link) {
@@ 263-268 (lines=6) @@
260
		);
261
		$this->output->writeln('');
262
263
		if ($this->input->getOption('all')) {
264
			$this->output->writeln('');
265
			$this->output->writeln('<info>### Complete report ###</info>');
266
			$this->output->writeln(json_encode($signedRequest, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
267
			$this->output->writeln('');
268
		}
269
270
		if ($remoteSignatory->getUid() !== $localSignatory->getUid()) {
271
			$remoteSignatory->setInstance($host);