Code Duplication    Length = 9-9 lines in 2 locations

apps/files_external/lib/ftp.php 1 location

@@ 47-55 (lines=9) @@
44
			$this->host=$params['host'];
45
			$this->user=$params['user'];
46
			$this->password=$params['password'];
47
			if (isset($params['secure'])) {
48
				if (is_string($params['secure'])) {
49
					$this->secure = ($params['secure'] === 'true');
50
				} else {
51
					$this->secure = (bool)$params['secure'];
52
				}
53
			} else {
54
				$this->secure = false;
55
			}
56
			$this->root=isset($params['root'])?$params['root']:'/';
57
			if ( ! $this->root || $this->root[0]!='/') {
58
				$this->root='/'.$this->root;

lib/private/files/storage/dav.php 1 location

@@ 95-103 (lines=9) @@
92
			$this->host = $host;
93
			$this->user = $params['user'];
94
			$this->password = $params['password'];
95
			if (isset($params['secure'])) {
96
				if (is_string($params['secure'])) {
97
					$this->secure = ($params['secure'] === 'true');
98
				} else {
99
					$this->secure = (bool)$params['secure'];
100
				}
101
			} else {
102
				$this->secure = false;
103
			}
104
			if ($this->secure === true) {
105
				$certPath = \OC_User::getHome(\OC_User::getUser()) . '/files_external/rootcerts.crt';
106
				if (file_exists($certPath)) {