Code Duplication    Length = 19-19 lines in 3 locations

apps/federation/lib/BackgroundJob/GetSharedSecret.php 1 location

@@ 99-117 (lines=19) @@
96
	 * @param IDiscoveryService $ocsDiscoveryService
97
	 * @param ITimeFactory $timeFactory
98
	 */
99
	public function __construct(
100
		IClientService $httpClientService,
101
		IURLGenerator $urlGenerator,
102
		IJobList $jobList,
103
		TrustedServers $trustedServers,
104
		ILogger $logger,
105
		DbHandler $dbHandler,
106
		IDiscoveryService $ocsDiscoveryService,
107
		ITimeFactory $timeFactory
108
	) {
109
		$this->logger = $logger;
110
		$this->httpClient = $httpClientService->newClient();
111
		$this->jobList = $jobList;
112
		$this->urlGenerator = $urlGenerator;
113
		$this->dbHandler = $dbHandler;
114
		$this->ocsDiscoveryService = $ocsDiscoveryService;
115
		$this->trustedServers = $trustedServers;
116
		$this->timeFactory = $timeFactory;
117
	}
118
119
	/**
120
	 * run the job, then remove it from the joblist

apps/federation/lib/BackgroundJob/RequestSharedSecret.php 1 location

@@ 99-117 (lines=19) @@
96
	 * @param ILogger $logger
97
	 * @param ITimeFactory $timeFactory
98
	 */
99
	public function __construct(
100
		IClientService $httpClientService,
101
		IURLGenerator $urlGenerator,
102
		IJobList $jobList,
103
		TrustedServers $trustedServers,
104
		DbHandler $dbHandler,
105
		IDiscoveryService $ocsDiscoveryService,
106
		ILogger $logger,
107
		ITimeFactory $timeFactory
108
	) {
109
		$this->httpClient = $httpClientService->newClient();
110
		$this->jobList = $jobList;
111
		$this->urlGenerator = $urlGenerator;
112
		$this->dbHandler = $dbHandler;
113
		$this->logger = $logger;
114
		$this->ocsDiscoveryService = $ocsDiscoveryService;
115
		$this->trustedServers = $trustedServers;
116
		$this->timeFactory = $timeFactory;
117
	}
118
119
120
	/**

apps/federation/lib/TrustedServers.php 1 location

@@ 85-103 (lines=19) @@
82
	 * @param EventDispatcherInterface $dispatcher
83
	 * @param ITimeFactory $timeFactory
84
	 */
85
	public function __construct(
86
		DbHandler $dbHandler,
87
		IClientService $httpClientService,
88
		ILogger $logger,
89
		IJobList $jobList,
90
		ISecureRandom $secureRandom,
91
		IConfig $config,
92
		EventDispatcherInterface $dispatcher,
93
		ITimeFactory $timeFactory
94
	) {
95
		$this->dbHandler = $dbHandler;
96
		$this->httpClientService = $httpClientService;
97
		$this->logger = $logger;
98
		$this->jobList = $jobList;
99
		$this->secureRandom = $secureRandom;
100
		$this->config = $config;
101
		$this->dispatcher = $dispatcher;
102
		$this->timeFactory = $timeFactory;
103
	}
104
105
	/**
106
	 * add server to the list of trusted servers