Code Duplication    Length = 9-14 lines in 2 locations

lib/Service/CapabilitiesService.php 1 location

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

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