Code Duplication    Length = 9-14 lines in 2 locations

lib/WOPI/DiscoveryManager.php 1 location

@@ 51-64 (lines=14) @@
48
	 * @param IL10N $l10n
49
	 * @param ITimeFactory $timeFactory
50
	 */
51
	public function __construct(IClientService $clientService,
52
								IAppData $appData,
53
								IConfig $config,
54
								IL10N $l10n,
55
								ITimeFactory $timeFactory) {
56
		$this->clientService = $clientService;
57
		try {
58
			$this->appData = $appData->getFolder('richdocuments');
59
		} catch (NotFoundException $e) {
60
			$this->appData = $appData->newFolder('richdocuments');
61
		}
62
		$this->config = $config;
63
		$this->timeFactory = $timeFactory;
64
	}
65
66
	public function get() {
67
		// First check if there is a local valid discovery file

lib/Service/CapabilitiesService.php 1 location

@@ 44-52 (lines=9) @@
41
	/** @var array */
42
	private $capabilities;
43
44
	public function __construct(IConfig $config, IClientService $clientService, IAppData $appData) {
45
		$this->config = $config;
46
		$this->clientService = $clientService;
47
		try {
48
			$this->appData = $appData->getFolder('richdocuments');
49
		} catch (NotFoundException $e) {
50
			$this->appData = $appData->newFolder('richdocuments');
51
		}
52
	}
53
54
55
	public function getCapabilities() {