Completed
Push — stable9 ( 11047b...318578 )
by Lukas
20:03 queued 09:36
created
settings/personal.php 3 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,9 +85,9 @@
 block discarded – undo
85 85
 	$potentialName = (string) $l->t('__language_name__');
86 86
 	if($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file
87 87
 		$ln=array('code'=>$lang, 'name'=> $potentialName);
88
-	}elseif(isset($languageNames[$lang])) {
88
+	} elseif(isset($languageNames[$lang])) {
89 89
 		$ln=array('code'=>$lang, 'name'=>$languageNames[$lang]);
90
-	}else{//fallback to language code
90
+	} else{//fallback to language code
91 91
 		$ln=array('code'=>$lang, 'name'=>$lang);
92 92
 	}
93 93
 
Please login to merge, or discard this patch.
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 \OC_Util::addScript('files', 'jquery.iframe-transport');
52 52
 \OC_Util::addScript('files', 'jquery.fileupload');
53 53
 if ($config->getSystemValue('enable_avatars', true) === true) {
54
-	\OC_Util::addVendorScript('jcrop/js/jquery.Jcrop');
55
-	\OC_Util::addVendorStyle('jcrop/css/jquery.Jcrop');
54
+    \OC_Util::addVendorScript('jcrop/js/jquery.Jcrop');
55
+    \OC_Util::addVendorStyle('jcrop/css/jquery.Jcrop');
56 56
 }
57 57
 
58 58
 // Highlight navigation entry
@@ -68,73 +68,73 @@  discard block
 block discarded – undo
68 68
 
69 69
 // array of common languages
70 70
 $commonLangCodes = array(
71
-	'en', 'es', 'fr', 'de', 'de_DE', 'ja', 'ar', 'ru', 'nl', 'it', 'pt_BR', 'pt_PT', 'da', 'fi_FI', 'nb_NO', 'sv', 'tr', 'zh_CN', 'ko'
71
+    'en', 'es', 'fr', 'de', 'de_DE', 'ja', 'ar', 'ru', 'nl', 'it', 'pt_BR', 'pt_PT', 'da', 'fi_FI', 'nb_NO', 'sv', 'tr', 'zh_CN', 'ko'
72 72
 );
73 73
 
74 74
 $languageNames=include 'languageCodes.php';
75 75
 $languages=array();
76 76
 $commonLanguages = array();
77 77
 foreach($languageCodes as $lang) {
78
-	$l = \OC::$server->getL10N('settings', $lang);
79
-	// TRANSLATORS this is the language name for the language switcher in the personal settings and should be the localized version
80
-	$potentialName = (string) $l->t('__language_name__');
81
-	if($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file
82
-		$ln=array('code'=>$lang, 'name'=> $potentialName);
83
-	}elseif(isset($languageNames[$lang])) {
84
-		$ln=array('code'=>$lang, 'name'=>$languageNames[$lang]);
85
-	}else{//fallback to language code
86
-		$ln=array('code'=>$lang, 'name'=>$lang);
87
-	}
88
-
89
-	// put appropriate languages into appropriate arrays, to print them sorted
90
-	// used language -> common languages -> divider -> other languages
91
-	if ($lang === $userLang) {
92
-		$userLang = $ln;
93
-	} elseif (in_array($lang, $commonLangCodes)) {
94
-		$commonLanguages[array_search($lang, $commonLangCodes)]=$ln;
95
-	} else {
96
-		$languages[]=$ln;
97
-	}
78
+    $l = \OC::$server->getL10N('settings', $lang);
79
+    // TRANSLATORS this is the language name for the language switcher in the personal settings and should be the localized version
80
+    $potentialName = (string) $l->t('__language_name__');
81
+    if($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file
82
+        $ln=array('code'=>$lang, 'name'=> $potentialName);
83
+    }elseif(isset($languageNames[$lang])) {
84
+        $ln=array('code'=>$lang, 'name'=>$languageNames[$lang]);
85
+    }else{//fallback to language code
86
+        $ln=array('code'=>$lang, 'name'=>$lang);
87
+    }
88
+
89
+    // put appropriate languages into appropriate arrays, to print them sorted
90
+    // used language -> common languages -> divider -> other languages
91
+    if ($lang === $userLang) {
92
+        $userLang = $ln;
93
+    } elseif (in_array($lang, $commonLangCodes)) {
94
+        $commonLanguages[array_search($lang, $commonLangCodes)]=$ln;
95
+    } else {
96
+        $languages[]=$ln;
97
+    }
98 98
 }
99 99
 
100 100
 // if user language is not available but set somehow: show the actual code as name
101 101
 if (!is_array($userLang)) {
102
-	$userLang = [
103
-		'code' => $userLang,
104
-		'name' => $userLang,
105
-	];
102
+    $userLang = [
103
+        'code' => $userLang,
104
+        'name' => $userLang,
105
+    ];
106 106
 }
107 107
 
108 108
 ksort($commonLanguages);
109 109
 
110 110
 // sort now by displayed language not the iso-code
111 111
 usort( $languages, function ($a, $b) {
112
-	if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) {
113
-		// If a doesn't have a name, but b does, list b before a
114
-		return 1;
115
-	}
116
-	if ($a['code'] !== $a['name'] && $b['code'] === $b['name']) {
117
-		// If a does have a name, but b doesn't, list a before b
118
-		return -1;
119
-	}
120
-	// Otherwise compare the names
121
-	return strcmp($a['name'], $b['name']);
112
+    if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) {
113
+        // If a doesn't have a name, but b does, list b before a
114
+        return 1;
115
+    }
116
+    if ($a['code'] !== $a['name'] && $b['code'] === $b['name']) {
117
+        // If a does have a name, but b doesn't, list a before b
118
+        return -1;
119
+    }
120
+    // Otherwise compare the names
121
+    return strcmp($a['name'], $b['name']);
122 122
 });
123 123
 
124 124
 //links to clients
125 125
 $clients = array(
126
-	'desktop' => $config->getSystemValue('customclient_desktop', $defaults->getSyncClientUrl()),
127
-	'android' => $config->getSystemValue('customclient_android', $defaults->getAndroidClientUrl()),
128
-	'ios'     => $config->getSystemValue('customclient_ios', $defaults->getiOSClientUrl())
126
+    'desktop' => $config->getSystemValue('customclient_desktop', $defaults->getSyncClientUrl()),
127
+    'android' => $config->getSystemValue('customclient_android', $defaults->getAndroidClientUrl()),
128
+    'ios'     => $config->getSystemValue('customclient_ios', $defaults->getiOSClientUrl())
129 129
 );
130 130
 
131 131
 // only show root certificate import if external storages are enabled
132 132
 $enableCertImport = false;
133 133
 $externalStorageEnabled = \OC::$server->getAppManager()->isEnabledForUser('files_external');
134 134
 if ($externalStorageEnabled) {
135
-	/** @var \OCA\Files_External\Service\BackendService $backendService */
136
-	$backendService = \OC_Mount_Config::$app->getContainer()->query('\OCA\Files_External\Service\BackendService');
137
-	$enableCertImport = $backendService->isUserMountingAllowed();
135
+    /** @var \OCA\Files_External\Service\BackendService $backendService */
136
+    $backendService = \OC_Mount_Config::$app->getContainer()->query('\OCA\Files_External\Service\BackendService');
137
+    $enableCertImport = $backendService->isUserMountingAllowed();
138 138
 }
139 139
 
140 140
 
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
 $tmpl = new OC_Template( 'settings', 'personal', 'user');
144 144
 $tmpl->assign('usage', OC_Helper::humanFileSize($storageInfo['used']));
145 145
 if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) {
146
-	$totalSpace = $l->t('Unlimited');
146
+    $totalSpace = $l->t('Unlimited');
147 147
 } else {
148
-	$totalSpace = OC_Helper::humanFileSize($storageInfo['total']);
148
+    $totalSpace = OC_Helper::humanFileSize($storageInfo['total']);
149 149
 }
150 150
 $tmpl->assign('total_space', $totalSpace);
151 151
 $tmpl->assign('usage_relative', $storageInfo['relative']);
@@ -179,30 +179,30 @@  discard block
 block discarded – undo
179 179
 
180 180
 // add bottom hardcoded forms from the template
181 181
 if ($enableCertImport) {
182
-	$certificatesTemplate = new OC_Template('settings', 'certificates');
183
-	$certificatesTemplate->assign('type', 'personal');
184
-	$certificatesTemplate->assign('uploadRoute', 'settings.Certificate.addPersonalRootCertificate');
185
-	$certificatesTemplate->assign('certs', $certificateManager->listCertificates());
186
-	$certificatesTemplate->assign('urlGenerator', $urlGenerator);
187
-	$forms[] = $certificatesTemplate->fetchPage();
182
+    $certificatesTemplate = new OC_Template('settings', 'certificates');
183
+    $certificatesTemplate->assign('type', 'personal');
184
+    $certificatesTemplate->assign('uploadRoute', 'settings.Certificate.addPersonalRootCertificate');
185
+    $certificatesTemplate->assign('certs', $certificateManager->listCertificates());
186
+    $certificatesTemplate->assign('urlGenerator', $urlGenerator);
187
+    $forms[] = $certificatesTemplate->fetchPage();
188 188
 }
189 189
 
190 190
 $formsMap = array_map(function($form){
191
-	if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
192
-		$sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]);
193
-		$sectionName = str_replace('</h2>', '', $sectionName);
194
-		$anchor = strtolower($sectionName);
195
-		$anchor = str_replace(' ', '-', $anchor);
196
-
197
-		return array(
198
-			'anchor' => $anchor,
199
-			'section-name' => $sectionName,
200
-			'form' => $form
201
-		);
202
-	}
203
-	return array(
204
-		'form' => $form
205
-	);
191
+    if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
192
+        $sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]);
193
+        $sectionName = str_replace('</h2>', '', $sectionName);
194
+        $anchor = strtolower($sectionName);
195
+        $anchor = str_replace(' ', '-', $anchor);
196
+
197
+        return array(
198
+            'anchor' => $anchor,
199
+            'section-name' => $sectionName,
200
+            'form' => $form
201
+        );
202
+    }
203
+    return array(
204
+        'form' => $form
205
+    );
206 206
 }, $forms);
207 207
 
208 208
 $formsAndMore = array_merge($formsAndMore, $formsMap);
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
 $urlGenerator = \OC::$server->getURLGenerator();
44 44
 
45 45
 // Highlight navigation entry
46
-OC_Util::addScript( 'settings', 'personal' );
46
+OC_Util::addScript('settings', 'personal');
47 47
 OC_Util::addScript('settings', 'certificates');
48
-OC_Util::addStyle( 'settings', 'settings' );
48
+OC_Util::addStyle('settings', 'settings');
49 49
 \OC_Util::addVendorScript('strengthify/jquery.strengthify');
50 50
 \OC_Util::addVendorStyle('strengthify/strengthify');
51 51
 \OC_Util::addScript('files', 'jquery.iframe-transport');
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
 // Highlight navigation entry
59 59
 OC::$server->getNavigationManager()->setActiveEntry('personal');
60 60
 
61
-$storageInfo=OC_Helper::getStorageInfo('/');
61
+$storageInfo = OC_Helper::getStorageInfo('/');
62 62
 
63 63
 $user = OC::$server->getUserManager()->get(OC_User::getUser());
64 64
 $email = $user->getEMailAddress();
65 65
 
66
-$userLang=$config->getUserValue( OC_User::getUser(), 'core', 'lang', OC_L10N::findLanguage() );
66
+$userLang = $config->getUserValue(OC_User::getUser(), 'core', 'lang', OC_L10N::findLanguage());
67 67
 $languageCodes = \OC::$server->getL10NFactory()->findAvailableLanguages();
68 68
 
69 69
 // array of common languages
@@ -71,19 +71,19 @@  discard block
 block discarded – undo
71 71
 	'en', 'es', 'fr', 'de', 'de_DE', 'ja', 'ar', 'ru', 'nl', 'it', 'pt_BR', 'pt_PT', 'da', 'fi_FI', 'nb_NO', 'sv', 'tr', 'zh_CN', 'ko'
72 72
 );
73 73
 
74
-$languageNames=include 'languageCodes.php';
75
-$languages=array();
74
+$languageNames = include 'languageCodes.php';
75
+$languages = array();
76 76
 $commonLanguages = array();
77
-foreach($languageCodes as $lang) {
77
+foreach ($languageCodes as $lang) {
78 78
 	$l = \OC::$server->getL10N('settings', $lang);
79 79
 	// TRANSLATORS this is the language name for the language switcher in the personal settings and should be the localized version
80 80
 	$potentialName = (string) $l->t('__language_name__');
81
-	if($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file
82
-		$ln=array('code'=>$lang, 'name'=> $potentialName);
83
-	}elseif(isset($languageNames[$lang])) {
84
-		$ln=array('code'=>$lang, 'name'=>$languageNames[$lang]);
85
-	}else{//fallback to language code
86
-		$ln=array('code'=>$lang, 'name'=>$lang);
81
+	if ($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file
82
+		$ln = array('code'=>$lang, 'name'=> $potentialName);
83
+	}elseif (isset($languageNames[$lang])) {
84
+		$ln = array('code'=>$lang, 'name'=>$languageNames[$lang]);
85
+	} else {//fallback to language code
86
+		$ln = array('code'=>$lang, 'name'=>$lang);
87 87
 	}
88 88
 
89 89
 	// put appropriate languages into appropriate arrays, to print them sorted
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
 	if ($lang === $userLang) {
92 92
 		$userLang = $ln;
93 93
 	} elseif (in_array($lang, $commonLangCodes)) {
94
-		$commonLanguages[array_search($lang, $commonLangCodes)]=$ln;
94
+		$commonLanguages[array_search($lang, $commonLangCodes)] = $ln;
95 95
 	} else {
96
-		$languages[]=$ln;
96
+		$languages[] = $ln;
97 97
 	}
98 98
 }
99 99
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 ksort($commonLanguages);
109 109
 
110 110
 // sort now by displayed language not the iso-code
111
-usort( $languages, function ($a, $b) {
111
+usort($languages, function($a, $b) {
112 112
 	if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) {
113 113
 		// If a doesn't have a name, but b does, list b before a
114 114
 		return 1;
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
 // Return template
142 142
 $l = \OC::$server->getL10N('settings');
143
-$tmpl = new OC_Template( 'settings', 'personal', 'user');
143
+$tmpl = new OC_Template('settings', 'personal', 'user');
144 144
 $tmpl->assign('usage', OC_Helper::humanFileSize($storageInfo['used']));
145 145
 if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) {
146 146
 	$totalSpace = $l->t('Unlimited');
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
 
172 172
 // add hardcoded forms from the template
173 173
 $formsAndMore = [];
174
-$formsAndMore[]= ['anchor' => 'avatar', 'section-name' => $l->t('Personal info')];
175
-$formsAndMore[]= ['anchor' => 'clientsbox', 'section-name' => $l->t('Sync clients')];
174
+$formsAndMore[] = ['anchor' => 'avatar', 'section-name' => $l->t('Personal info')];
175
+$formsAndMore[] = ['anchor' => 'clientsbox', 'section-name' => $l->t('Sync clients')];
176 176
 
177
-$forms=OC_App::getForms('personal');
177
+$forms = OC_App::getForms('personal');
178 178
 
179 179
 
180 180
 // add bottom hardcoded forms from the template
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	$forms[] = $certificatesTemplate->fetchPage();
188 188
 }
189 189
 
190
-$formsMap = array_map(function($form){
190
+$formsMap = array_map(function($form) {
191 191
 	if (preg_match('%(<h2(?P<class>[^>]*)>.*?</h2>)%i', $form, $regs)) {
192 192
 		$sectionName = str_replace('<h2'.$regs['class'].'>', '', $regs[0]);
193 193
 		$sectionName = str_replace('</h2>', '', $sectionName);
Please login to merge, or discard this patch.
status.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -29,27 +29,27 @@
 block discarded – undo
29 29
 
30 30
 try {
31 31
 
32
-	require_once __DIR__ . '/lib/base.php';
32
+    require_once __DIR__ . '/lib/base.php';
33 33
 
34
-	$systemConfig = \OC::$server->getSystemConfig();
34
+    $systemConfig = \OC::$server->getSystemConfig();
35 35
 
36
-	$installed = (bool) $systemConfig->getValue('installed', false);
37
-	$maintenance = (bool) $systemConfig->getValue('maintenance', false);
38
-	$values=array(
39
-		'installed'=>$installed,
40
-		'maintenance' => $maintenance,
41
-		'version'=>implode('.', \OCP\Util::getVersion()),
42
-		'versionstring'=>OC_Util::getVersionString(),
43
-		'edition'=> $installed ? OC_Util::getEditionString() : '');
44
-	if (OC::$CLI) {
45
-		print_r($values);
46
-	} else {
47
-		header('Access-Control-Allow-Origin: *');
48
-		header('Content-Type: application/json');
49
-		echo json_encode($values);
50
-	}
36
+    $installed = (bool) $systemConfig->getValue('installed', false);
37
+    $maintenance = (bool) $systemConfig->getValue('maintenance', false);
38
+    $values=array(
39
+        'installed'=>$installed,
40
+        'maintenance' => $maintenance,
41
+        'version'=>implode('.', \OCP\Util::getVersion()),
42
+        'versionstring'=>OC_Util::getVersionString(),
43
+        'edition'=> $installed ? OC_Util::getEditionString() : '');
44
+    if (OC::$CLI) {
45
+        print_r($values);
46
+    } else {
47
+        header('Access-Control-Allow-Origin: *');
48
+        header('Content-Type: application/json');
49
+        echo json_encode($values);
50
+    }
51 51
 
52 52
 } catch (Exception $ex) {
53
-	OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
54
-	\OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
53
+    OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
54
+    \OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
55 55
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@
 block discarded – undo
29 29
 
30 30
 try {
31 31
 
32
-	require_once __DIR__ . '/lib/base.php';
32
+	require_once __DIR__.'/lib/base.php';
33 33
 
34 34
 	$systemConfig = \OC::$server->getSystemConfig();
35 35
 
36 36
 	$installed = (bool) $systemConfig->getValue('installed', false);
37 37
 	$maintenance = (bool) $systemConfig->getValue('maintenance', false);
38
-	$values=array(
38
+	$values = array(
39 39
 		'installed'=>$installed,
40 40
 		'maintenance' => $maintenance,
41 41
 		'version'=>implode('.', \OCP\Util::getVersion()),
Please login to merge, or discard this patch.
public.php 2 patches
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -27,61 +27,61 @@
 block discarded – undo
27 27
  */
28 28
 try {
29 29
 
30
-	require_once __DIR__ . '/lib/base.php';
31
-	if (\OCP\Util::needUpgrade()) {
32
-		// since the behavior of apps or remotes are unpredictable during
33
-		// an upgrade, return a 503 directly
34
-		OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
35
-		OC_Template::printErrorPage('Service unavailable');
36
-		exit;
37
-	}
30
+    require_once __DIR__ . '/lib/base.php';
31
+    if (\OCP\Util::needUpgrade()) {
32
+        // since the behavior of apps or remotes are unpredictable during
33
+        // an upgrade, return a 503 directly
34
+        OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
35
+        OC_Template::printErrorPage('Service unavailable');
36
+        exit;
37
+    }
38 38
 
39
-	OC::checkMaintenanceMode();
40
-	OC::checkSingleUserMode(true);
41
-	$request = \OC::$server->getRequest();
42
-	$pathInfo = $request->getPathInfo();
39
+    OC::checkMaintenanceMode();
40
+    OC::checkSingleUserMode(true);
41
+    $request = \OC::$server->getRequest();
42
+    $pathInfo = $request->getPathInfo();
43 43
 
44
-	if (!$pathInfo && $request->getParam('service', '') === '') {
45
-		header('HTTP/1.0 404 Not Found');
46
-		exit;
47
-	} elseif ($request->getParam('service', '')) {
48
-		$service = $request->getParam('service', '');
49
-	} else {
50
-		$pathInfo = trim($pathInfo, '/');
51
-		list($service) = explode('/', $pathInfo);
52
-	}
53
-	$file = OCP\CONFIG::getAppValue('core', 'public_' . strip_tags($service));
54
-	if (is_null($file)) {
55
-		header('HTTP/1.0 404 Not Found');
56
-		exit;
57
-	}
44
+    if (!$pathInfo && $request->getParam('service', '') === '') {
45
+        header('HTTP/1.0 404 Not Found');
46
+        exit;
47
+    } elseif ($request->getParam('service', '')) {
48
+        $service = $request->getParam('service', '');
49
+    } else {
50
+        $pathInfo = trim($pathInfo, '/');
51
+        list($service) = explode('/', $pathInfo);
52
+    }
53
+    $file = OCP\CONFIG::getAppValue('core', 'public_' . strip_tags($service));
54
+    if (is_null($file)) {
55
+        header('HTTP/1.0 404 Not Found');
56
+        exit;
57
+    }
58 58
 
59
-	$parts = explode('/', $file, 2);
60
-	$app = $parts[0];
59
+    $parts = explode('/', $file, 2);
60
+    $app = $parts[0];
61 61
 
62
-	// Load all required applications
63
-	\OC::$REQUESTEDAPP = $app;
64
-	OC_App::loadApps(array('authentication'));
65
-	OC_App::loadApps(array('filesystem', 'logging'));
62
+    // Load all required applications
63
+    \OC::$REQUESTEDAPP = $app;
64
+    OC_App::loadApps(array('authentication'));
65
+    OC_App::loadApps(array('filesystem', 'logging'));
66 66
 
67
-	if (!\OC::$server->getAppManager()->isInstalled($app)) {
68
-		throw new Exception('App not installed: ' . $app);
69
-	}
70
-	OC_App::loadApp($app);
71
-	OC_User::setIncognitoMode(true);
67
+    if (!\OC::$server->getAppManager()->isInstalled($app)) {
68
+        throw new Exception('App not installed: ' . $app);
69
+    }
70
+    OC_App::loadApp($app);
71
+    OC_User::setIncognitoMode(true);
72 72
 
73
-	$baseuri = OC::$WEBROOT . '/public.php/' . $service . '/';
73
+    $baseuri = OC::$WEBROOT . '/public.php/' . $service . '/';
74 74
 
75
-	require_once OC_App::getAppPath($app) . '/' . $parts[1];
75
+    require_once OC_App::getAppPath($app) . '/' . $parts[1];
76 76
 
77 77
 } catch (\OC\ServiceUnavailableException $ex) {
78
-	//show the user a detailed error page
79
-	OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
80
-	\OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
81
-	OC_Template::printExceptionErrorPage($ex);
78
+    //show the user a detailed error page
79
+    OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
80
+    \OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
81
+    OC_Template::printExceptionErrorPage($ex);
82 82
 } catch (Exception $ex) {
83
-	//show the user a detailed error page
84
-	OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
85
-	\OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
86
-	OC_Template::printExceptionErrorPage($ex);
83
+    //show the user a detailed error page
84
+    OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
85
+    \OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL);
86
+    OC_Template::printExceptionErrorPage($ex);
87 87
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  */
28 28
 try {
29 29
 
30
-	require_once __DIR__ . '/lib/base.php';
30
+	require_once __DIR__.'/lib/base.php';
31 31
 	if (\OCP\Util::needUpgrade()) {
32 32
 		// since the behavior of apps or remotes are unpredictable during
33 33
 		// an upgrade, return a 503 directly
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 		$pathInfo = trim($pathInfo, '/');
51 51
 		list($service) = explode('/', $pathInfo);
52 52
 	}
53
-	$file = OCP\CONFIG::getAppValue('core', 'public_' . strip_tags($service));
53
+	$file = OCP\CONFIG::getAppValue('core', 'public_'.strip_tags($service));
54 54
 	if (is_null($file)) {
55 55
 		header('HTTP/1.0 404 Not Found');
56 56
 		exit;
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
 	OC_App::loadApps(array('filesystem', 'logging'));
66 66
 
67 67
 	if (!\OC::$server->getAppManager()->isInstalled($app)) {
68
-		throw new Exception('App not installed: ' . $app);
68
+		throw new Exception('App not installed: '.$app);
69 69
 	}
70 70
 	OC_App::loadApp($app);
71 71
 	OC_User::setIncognitoMode(true);
72 72
 
73
-	$baseuri = OC::$WEBROOT . '/public.php/' . $service . '/';
73
+	$baseuri = OC::$WEBROOT.'/public.php/'.$service.'/';
74 74
 
75
-	require_once OC_App::getAppPath($app) . '/' . $parts[1];
75
+	require_once OC_App::getAppPath($app).'/'.$parts[1];
76 76
 
77 77
 } catch (\OC\ServiceUnavailableException $ex) {
78 78
 	//show the user a detailed error page
Please login to merge, or discard this patch.
remote.php 2 patches
Indentation   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -44,100 +44,100 @@
 block discarded – undo
44 44
  * @param Exception $e
45 45
  */
46 46
 function handleException(Exception $e) {
47
-	$request = \OC::$server->getRequest();
48
-	// in case the request content type is text/xml - we assume it's a WebDAV request
49
-	$isXmlContentType = strpos($request->getHeader('Content-Type'), 'text/xml');
50
-	if ($isXmlContentType === 0) {
51
-		// fire up a simple server to properly process the exception
52
-		$server = new Server();
53
-		if (!($e instanceof RemoteException)) {
54
-			// we shall not log on RemoteException
55
-			$server->addPlugin(new ExceptionLoggerPlugin('webdav', \OC::$server->getLogger()));
56
-		}
57
-		$server->on('beforeMethod', function () use ($e) {
58
-			if ($e instanceof RemoteException) {
59
-				switch ($e->getCode()) {
60
-					case OC_Response::STATUS_SERVICE_UNAVAILABLE:
61
-						throw new ServiceUnavailable($e->getMessage());
62
-					case OC_Response::STATUS_NOT_FOUND:
63
-						throw new \Sabre\DAV\Exception\NotFound($e->getMessage());
64
-				}
65
-			}
66
-			$class = get_class($e);
67
-			$msg = $e->getMessage();
68
-			throw new ServiceUnavailable("$class: $msg");
69
-		});
70
-		$server->exec();
71
-	} else {
72
-		$statusCode = OC_Response::STATUS_INTERNAL_SERVER_ERROR;
73
-		if ($e instanceof \OC\ServiceUnavailableException ) {
74
-			$statusCode = OC_Response::STATUS_SERVICE_UNAVAILABLE;
75
-		}
76
-		if ($e instanceof RemoteException) {
77
-			// we shall not log on RemoteException
78
-			OC_Response::setStatus($e->getCode());
79
-			OC_Template::printErrorPage($e->getMessage());
80
-		} else {
81
-			\OCP\Util::writeLog('remote', $e->getMessage(), \OCP\Util::FATAL);
82
-			OC_Response::setStatus($statusCode);
83
-			OC_Template::printExceptionErrorPage($e);
84
-		}
85
-	}
47
+    $request = \OC::$server->getRequest();
48
+    // in case the request content type is text/xml - we assume it's a WebDAV request
49
+    $isXmlContentType = strpos($request->getHeader('Content-Type'), 'text/xml');
50
+    if ($isXmlContentType === 0) {
51
+        // fire up a simple server to properly process the exception
52
+        $server = new Server();
53
+        if (!($e instanceof RemoteException)) {
54
+            // we shall not log on RemoteException
55
+            $server->addPlugin(new ExceptionLoggerPlugin('webdav', \OC::$server->getLogger()));
56
+        }
57
+        $server->on('beforeMethod', function () use ($e) {
58
+            if ($e instanceof RemoteException) {
59
+                switch ($e->getCode()) {
60
+                    case OC_Response::STATUS_SERVICE_UNAVAILABLE:
61
+                        throw new ServiceUnavailable($e->getMessage());
62
+                    case OC_Response::STATUS_NOT_FOUND:
63
+                        throw new \Sabre\DAV\Exception\NotFound($e->getMessage());
64
+                }
65
+            }
66
+            $class = get_class($e);
67
+            $msg = $e->getMessage();
68
+            throw new ServiceUnavailable("$class: $msg");
69
+        });
70
+        $server->exec();
71
+    } else {
72
+        $statusCode = OC_Response::STATUS_INTERNAL_SERVER_ERROR;
73
+        if ($e instanceof \OC\ServiceUnavailableException ) {
74
+            $statusCode = OC_Response::STATUS_SERVICE_UNAVAILABLE;
75
+        }
76
+        if ($e instanceof RemoteException) {
77
+            // we shall not log on RemoteException
78
+            OC_Response::setStatus($e->getCode());
79
+            OC_Template::printErrorPage($e->getMessage());
80
+        } else {
81
+            \OCP\Util::writeLog('remote', $e->getMessage(), \OCP\Util::FATAL);
82
+            OC_Response::setStatus($statusCode);
83
+            OC_Template::printExceptionErrorPage($e);
84
+        }
85
+    }
86 86
 }
87 87
 
88 88
 try {
89
-	require_once __DIR__ . '/lib/base.php';
89
+    require_once __DIR__ . '/lib/base.php';
90 90
 
91
-	if (\OCP\Util::needUpgrade()) {
92
-		// since the behavior of apps or remotes are unpredictable during
93
-		// an upgrade, return a 503 directly
94
-		throw new RemoteException('Service unavailable', OC_Response::STATUS_SERVICE_UNAVAILABLE);
95
-	}
91
+    if (\OCP\Util::needUpgrade()) {
92
+        // since the behavior of apps or remotes are unpredictable during
93
+        // an upgrade, return a 503 directly
94
+        throw new RemoteException('Service unavailable', OC_Response::STATUS_SERVICE_UNAVAILABLE);
95
+    }
96 96
 
97
-	$request = \OC::$server->getRequest();
98
-	$pathInfo = $request->getPathInfo();
99
-	if ($pathInfo === false || $pathInfo === '') {
100
-		throw new RemoteException('Path not found', OC_Response::STATUS_NOT_FOUND);
101
-	}
102
-	if (!$pos = strpos($pathInfo, '/', 1)) {
103
-		$pos = strlen($pathInfo);
104
-	}
105
-	$service=substr($pathInfo, 1, $pos-1);
97
+    $request = \OC::$server->getRequest();
98
+    $pathInfo = $request->getPathInfo();
99
+    if ($pathInfo === false || $pathInfo === '') {
100
+        throw new RemoteException('Path not found', OC_Response::STATUS_NOT_FOUND);
101
+    }
102
+    if (!$pos = strpos($pathInfo, '/', 1)) {
103
+        $pos = strlen($pathInfo);
104
+    }
105
+    $service=substr($pathInfo, 1, $pos-1);
106 106
 
107
-	$file = \OC::$server->getConfig()->getAppValue('core', 'remote_' . $service);
107
+    $file = \OC::$server->getConfig()->getAppValue('core', 'remote_' . $service);
108 108
 
109
-	if(is_null($file)) {
110
-		throw new RemoteException('Path not found', OC_Response::STATUS_NOT_FOUND);
111
-	}
109
+    if(is_null($file)) {
110
+        throw new RemoteException('Path not found', OC_Response::STATUS_NOT_FOUND);
111
+    }
112 112
 
113
-	// force language as given in the http request
114
-	\OC::$server->getL10NFactory()->setLanguageFromRequest();
113
+    // force language as given in the http request
114
+    \OC::$server->getL10NFactory()->setLanguageFromRequest();
115 115
 
116
-	$file=ltrim($file, '/');
116
+    $file=ltrim($file, '/');
117 117
 
118
-	$parts=explode('/', $file, 2);
119
-	$app=$parts[0];
118
+    $parts=explode('/', $file, 2);
119
+    $app=$parts[0];
120 120
 
121
-	// Load all required applications
122
-	\OC::$REQUESTEDAPP = $app;
123
-	OC_App::loadApps(array('authentication'));
124
-	OC_App::loadApps(array('filesystem', 'logging'));
121
+    // Load all required applications
122
+    \OC::$REQUESTEDAPP = $app;
123
+    OC_App::loadApps(array('authentication'));
124
+    OC_App::loadApps(array('filesystem', 'logging'));
125 125
 
126
-	switch ($app) {
127
-		case 'core':
128
-			$file =  OC::$SERVERROOT .'/'. $file;
129
-			break;
130
-		default:
131
-			if (!\OC::$server->getAppManager()->isInstalled($app)) {
132
-				throw new RemoteException('App not installed: ' . $app);
133
-			}
134
-			OC_App::loadApp($app);
135
-			$file = OC_App::getAppPath($app) .'/'. $parts[1];
136
-			break;
137
-	}
138
-	$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
139
-	require_once $file;
126
+    switch ($app) {
127
+        case 'core':
128
+            $file =  OC::$SERVERROOT .'/'. $file;
129
+            break;
130
+        default:
131
+            if (!\OC::$server->getAppManager()->isInstalled($app)) {
132
+                throw new RemoteException('App not installed: ' . $app);
133
+            }
134
+            OC_App::loadApp($app);
135
+            $file = OC_App::getAppPath($app) .'/'. $parts[1];
136
+            break;
137
+    }
138
+    $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
139
+    require_once $file;
140 140
 
141 141
 } catch (Exception $ex) {
142
-	handleException($ex);
142
+    handleException($ex);
143 143
 }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 			// we shall not log on RemoteException
55 55
 			$server->addPlugin(new ExceptionLoggerPlugin('webdav', \OC::$server->getLogger()));
56 56
 		}
57
-		$server->on('beforeMethod', function () use ($e) {
57
+		$server->on('beforeMethod', function() use ($e) {
58 58
 			if ($e instanceof RemoteException) {
59 59
 				switch ($e->getCode()) {
60 60
 					case OC_Response::STATUS_SERVICE_UNAVAILABLE:
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 		$server->exec();
71 71
 	} else {
72 72
 		$statusCode = OC_Response::STATUS_INTERNAL_SERVER_ERROR;
73
-		if ($e instanceof \OC\ServiceUnavailableException ) {
73
+		if ($e instanceof \OC\ServiceUnavailableException) {
74 74
 			$statusCode = OC_Response::STATUS_SERVICE_UNAVAILABLE;
75 75
 		}
76 76
 		if ($e instanceof RemoteException) {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 }
87 87
 
88 88
 try {
89
-	require_once __DIR__ . '/lib/base.php';
89
+	require_once __DIR__.'/lib/base.php';
90 90
 
91 91
 	if (\OCP\Util::needUpgrade()) {
92 92
 		// since the behavior of apps or remotes are unpredictable during
@@ -102,21 +102,21 @@  discard block
 block discarded – undo
102 102
 	if (!$pos = strpos($pathInfo, '/', 1)) {
103 103
 		$pos = strlen($pathInfo);
104 104
 	}
105
-	$service=substr($pathInfo, 1, $pos-1);
105
+	$service = substr($pathInfo, 1, $pos - 1);
106 106
 
107
-	$file = \OC::$server->getConfig()->getAppValue('core', 'remote_' . $service);
107
+	$file = \OC::$server->getConfig()->getAppValue('core', 'remote_'.$service);
108 108
 
109
-	if(is_null($file)) {
109
+	if (is_null($file)) {
110 110
 		throw new RemoteException('Path not found', OC_Response::STATUS_NOT_FOUND);
111 111
 	}
112 112
 
113 113
 	// force language as given in the http request
114 114
 	\OC::$server->getL10NFactory()->setLanguageFromRequest();
115 115
 
116
-	$file=ltrim($file, '/');
116
+	$file = ltrim($file, '/');
117 117
 
118
-	$parts=explode('/', $file, 2);
119
-	$app=$parts[0];
118
+	$parts = explode('/', $file, 2);
119
+	$app = $parts[0];
120 120
 
121 121
 	// Load all required applications
122 122
 	\OC::$REQUESTEDAPP = $app;
@@ -125,17 +125,17 @@  discard block
 block discarded – undo
125 125
 
126 126
 	switch ($app) {
127 127
 		case 'core':
128
-			$file =  OC::$SERVERROOT .'/'. $file;
128
+			$file = OC::$SERVERROOT.'/'.$file;
129 129
 			break;
130 130
 		default:
131 131
 			if (!\OC::$server->getAppManager()->isInstalled($app)) {
132
-				throw new RemoteException('App not installed: ' . $app);
132
+				throw new RemoteException('App not installed: '.$app);
133 133
 			}
134 134
 			OC_App::loadApp($app);
135
-			$file = OC_App::getAppPath($app) .'/'. $parts[1];
135
+			$file = OC_App::getAppPath($app).'/'.$parts[1];
136 136
 			break;
137 137
 	}
138
-	$baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/';
138
+	$baseuri = OC::$WEBROOT.'/remote.php/'.$service.'/';
139 139
 	require_once $file;
140 140
 
141 141
 } catch (Exception $ex) {
Please login to merge, or discard this patch.
lib/public/userinterface.php 1 patch
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -40,68 +40,68 @@
 block discarded – undo
40 40
  */
41 41
 interface UserInterface {
42 42
 
43
-	/**
44
-	 * Check if backend implements actions
45
-	 * @param int $actions bitwise-or'ed actions
46
-	 * @return boolean
47
-	 *
48
-	 * Returns the supported actions as int to be
49
-	 * compared with \OC_User_Backend::CREATE_USER etc.
50
-	 * @since 4.5.0
51
-	 */
52
-	public function implementsActions($actions);
43
+    /**
44
+     * Check if backend implements actions
45
+     * @param int $actions bitwise-or'ed actions
46
+     * @return boolean
47
+     *
48
+     * Returns the supported actions as int to be
49
+     * compared with \OC_User_Backend::CREATE_USER etc.
50
+     * @since 4.5.0
51
+     */
52
+    public function implementsActions($actions);
53 53
 
54
-	/**
55
-	 * delete a user
56
-	 * @param string $uid The username of the user to delete
57
-	 * @return bool
58
-	 * @since 4.5.0
59
-	 */
60
-	public function deleteUser($uid);
54
+    /**
55
+     * delete a user
56
+     * @param string $uid The username of the user to delete
57
+     * @return bool
58
+     * @since 4.5.0
59
+     */
60
+    public function deleteUser($uid);
61 61
 
62
-	/**
63
-	 * Get a list of all users
64
-	 *
65
-	 * @param string $search
66
-	 * @param null|int $limit
67
-	 * @param null|int $offset
68
-	 * @return string[] an array of all uids
69
-	 * @since 4.5.0
70
-	 */
71
-	public function getUsers($search = '', $limit = null, $offset = null);
62
+    /**
63
+     * Get a list of all users
64
+     *
65
+     * @param string $search
66
+     * @param null|int $limit
67
+     * @param null|int $offset
68
+     * @return string[] an array of all uids
69
+     * @since 4.5.0
70
+     */
71
+    public function getUsers($search = '', $limit = null, $offset = null);
72 72
 
73
-	/**
74
-	 * check if a user exists
75
-	 * @param string $uid the username
76
-	 * @return boolean
77
-	 * @since 4.5.0
78
-	 */
79
-	public function userExists($uid);
73
+    /**
74
+     * check if a user exists
75
+     * @param string $uid the username
76
+     * @return boolean
77
+     * @since 4.5.0
78
+     */
79
+    public function userExists($uid);
80 80
 
81
-	/**
82
-	 * get display name of the user
83
-	 * @param string $uid user ID of the user
84
-	 * @return string display name
85
-	 * @since 4.5.0
86
-	 */
87
-	public function getDisplayName($uid);
81
+    /**
82
+     * get display name of the user
83
+     * @param string $uid user ID of the user
84
+     * @return string display name
85
+     * @since 4.5.0
86
+     */
87
+    public function getDisplayName($uid);
88 88
 
89
-	/**
90
-	 * Get a list of all display names and user ids.
91
-	 *
92
-	 * @param string $search
93
-	 * @param string|null $limit
94
-	 * @param string|null $offset
95
-	 * @return array an array of all displayNames (value) and the corresponding uids (key)
96
-	 * @since 4.5.0
97
-	 */
98
-	public function getDisplayNames($search = '', $limit = null, $offset = null);
89
+    /**
90
+     * Get a list of all display names and user ids.
91
+     *
92
+     * @param string $search
93
+     * @param string|null $limit
94
+     * @param string|null $offset
95
+     * @return array an array of all displayNames (value) and the corresponding uids (key)
96
+     * @since 4.5.0
97
+     */
98
+    public function getDisplayNames($search = '', $limit = null, $offset = null);
99 99
 
100
-	/**
101
-	 * Check if a user list is available or not
102
-	 * @return boolean if users can be listed or not
103
-	 * @since 4.5.0
104
-	 */
105
-	public function hasUserListings();
100
+    /**
101
+     * Check if a user list is available or not
102
+     * @return boolean if users can be listed or not
103
+     * @since 4.5.0
104
+     */
105
+    public function hasUserListings();
106 106
 
107 107
 }
Please login to merge, or discard this patch.
lib/public/l10n/ifactory.php 1 patch
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -25,56 +25,56 @@
 block discarded – undo
25 25
  * @since 8.2.0
26 26
  */
27 27
 interface IFactory {
28
-	/**
29
-	 * Get a language instance
30
-	 *
31
-	 * @param string $app
32
-	 * @param string|null $lang
33
-	 * @return \OCP\IL10N
34
-	 * @since 8.2.0
35
-	 */
36
-	public function get($app, $lang = null);
28
+    /**
29
+     * Get a language instance
30
+     *
31
+     * @param string $app
32
+     * @param string|null $lang
33
+     * @return \OCP\IL10N
34
+     * @since 8.2.0
35
+     */
36
+    public function get($app, $lang = null);
37 37
 
38
-	/**
39
-	 * Find the best language
40
-	 *
41
-	 * @param string|null $app App id or null for core
42
-	 * @return string language If nothing works it returns 'en'
43
-	 * @since 9.0.0
44
-	 */
45
-	public function findLanguage($app = null);
38
+    /**
39
+     * Find the best language
40
+     *
41
+     * @param string|null $app App id or null for core
42
+     * @return string language If nothing works it returns 'en'
43
+     * @since 9.0.0
44
+     */
45
+    public function findLanguage($app = null);
46 46
 
47
-	/**
48
-	 * Find all available languages for an app
49
-	 *
50
-	 * @param string|null $app App id or null for core
51
-	 * @return string[] an array of available languages
52
-	 * @since 9.0.0
53
-	 */
54
-	public function findAvailableLanguages($app = null);
47
+    /**
48
+     * Find all available languages for an app
49
+     *
50
+     * @param string|null $app App id or null for core
51
+     * @return string[] an array of available languages
52
+     * @since 9.0.0
53
+     */
54
+    public function findAvailableLanguages($app = null);
55 55
 
56
-	/**
57
-	 * @param string|null $app App id or null for core
58
-	 * @param string $lang
59
-	 * @return bool
60
-	 * @since 9.0.0
61
-	 */
62
-	public function languageExists($app, $lang);
56
+    /**
57
+     * @param string|null $app App id or null for core
58
+     * @param string $lang
59
+     * @return bool
60
+     * @since 9.0.0
61
+     */
62
+    public function languageExists($app, $lang);
63 63
 
64
-	/**
65
-	 * @param string|null $app App id or null for core
66
-	 * @return string
67
-	 * @since 9.0.0
68
-	 */
69
-	public function setLanguageFromRequest($app = null);
64
+    /**
65
+     * @param string|null $app App id or null for core
66
+     * @return string
67
+     * @since 9.0.0
68
+     */
69
+    public function setLanguageFromRequest($app = null);
70 70
 
71 71
 
72
-	/**
73
-	 * Creates a function from the plural string
74
-	 *
75
-	 * @param string $string
76
-	 * @return string Unique function name
77
-	 * @since 9.0.0
78
-	 */
79
-	public function createPluralFunction($string);
72
+    /**
73
+     * Creates a function from the plural string
74
+     *
75
+     * @param string $string
76
+     * @return string Unique function name
77
+     * @since 9.0.0
78
+     */
79
+    public function createPluralFunction($string);
80 80
 }
Please login to merge, or discard this patch.
lib/public/lock/lockedexception.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -32,31 +32,31 @@
 block discarded – undo
32 32
  */
33 33
 class LockedException extends \Exception {
34 34
 
35
-	/**
36
-	 * Locked path
37
-	 *
38
-	 * @var string
39
-	 */
40
-	private $path;
35
+    /**
36
+     * Locked path
37
+     *
38
+     * @var string
39
+     */
40
+    private $path;
41 41
 
42
-	/**
43
-	 * LockedException constructor.
44
-	 *
45
-	 * @param string $path locked path
46
-	 * @param \Exception $previous previous exception for cascading
47
-	 *
48
-	 * @since 8.1.0
49
-	 */
50
-	public function __construct($path, \Exception $previous = null) {
51
-		parent::__construct('"' . $path . '" is locked', 0, $previous);
52
-		$this->path = $path;
53
-	}
42
+    /**
43
+     * LockedException constructor.
44
+     *
45
+     * @param string $path locked path
46
+     * @param \Exception $previous previous exception for cascading
47
+     *
48
+     * @since 8.1.0
49
+     */
50
+    public function __construct($path, \Exception $previous = null) {
51
+        parent::__construct('"' . $path . '" is locked', 0, $previous);
52
+        $this->path = $path;
53
+    }
54 54
 
55
-	/**
56
-	 * @return string
57
-	 * @since 8.1.0
58
-	 */
59
-	public function getPath() {
60
-		return $this->path;
61
-	}
55
+    /**
56
+     * @return string
57
+     * @since 8.1.0
58
+     */
59
+    public function getPath() {
60
+        return $this->path;
61
+    }
62 62
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 	 * @since 8.1.0
49 49
 	 */
50 50
 	public function __construct($path, \Exception $previous = null) {
51
-		parent::__construct('"' . $path . '" is locked', 0, $previous);
51
+		parent::__construct('"'.$path.'" is locked', 0, $previous);
52 52
 		$this->path = $path;
53 53
 	}
54 54
 
Please login to merge, or discard this patch.
lib/public/lock/ilockingprovider.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -30,51 +30,51 @@
 block discarded – undo
30 30
  * @since 8.1.0
31 31
  */
32 32
 interface ILockingProvider {
33
-	/**
34
-	 * @since 8.1.0
35
-	 */
36
-	const LOCK_SHARED = 1;
37
-	/**
38
-	 * @since 8.1.0
39
-	 */
40
-	const LOCK_EXCLUSIVE = 2;
33
+    /**
34
+     * @since 8.1.0
35
+     */
36
+    const LOCK_SHARED = 1;
37
+    /**
38
+     * @since 8.1.0
39
+     */
40
+    const LOCK_EXCLUSIVE = 2;
41 41
 
42
-	/**
43
-	 * @param string $path
44
-	 * @param int $type self::LOCK_SHARED or self::LOCK_EXCLUSIVE
45
-	 * @return bool
46
-	 * @since 8.1.0
47
-	 */
48
-	public function isLocked($path, $type);
42
+    /**
43
+     * @param string $path
44
+     * @param int $type self::LOCK_SHARED or self::LOCK_EXCLUSIVE
45
+     * @return bool
46
+     * @since 8.1.0
47
+     */
48
+    public function isLocked($path, $type);
49 49
 
50
-	/**
51
-	 * @param string $path
52
-	 * @param int $type self::LOCK_SHARED or self::LOCK_EXCLUSIVE
53
-	 * @throws \OCP\Lock\LockedException
54
-	 * @since 8.1.0
55
-	 */
56
-	public function acquireLock($path, $type);
50
+    /**
51
+     * @param string $path
52
+     * @param int $type self::LOCK_SHARED or self::LOCK_EXCLUSIVE
53
+     * @throws \OCP\Lock\LockedException
54
+     * @since 8.1.0
55
+     */
56
+    public function acquireLock($path, $type);
57 57
 
58
-	/**
59
-	 * @param string $path
60
-	 * @param int $type self::LOCK_SHARED or self::LOCK_EXCLUSIVE
61
-	 * @since 8.1.0
62
-	 */
63
-	public function releaseLock($path, $type);
58
+    /**
59
+     * @param string $path
60
+     * @param int $type self::LOCK_SHARED or self::LOCK_EXCLUSIVE
61
+     * @since 8.1.0
62
+     */
63
+    public function releaseLock($path, $type);
64 64
 
65
-	/**
66
-	 * Change the type of an existing lock
67
-	 *
68
-	 * @param string $path
69
-	 * @param int $targetType self::LOCK_SHARED or self::LOCK_EXCLUSIVE
70
-	 * @throws \OCP\Lock\LockedException
71
-	 * @since 8.1.0
72
-	 */
73
-	public function changeLock($path, $targetType);
65
+    /**
66
+     * Change the type of an existing lock
67
+     *
68
+     * @param string $path
69
+     * @param int $targetType self::LOCK_SHARED or self::LOCK_EXCLUSIVE
70
+     * @throws \OCP\Lock\LockedException
71
+     * @since 8.1.0
72
+     */
73
+    public function changeLock($path, $targetType);
74 74
 
75
-	/**
76
-	 * release all lock acquired by this instance
77
-	 * @since 8.1.0
78
-	 */
79
-	public function releaseAll();
75
+    /**
76
+     * release all lock acquired by this instance
77
+     * @since 8.1.0
78
+     */
79
+    public function releaseAll();
80 80
 }
Please login to merge, or discard this patch.
lib/public/groupinterface.php 1 patch
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -40,68 +40,68 @@
 block discarded – undo
40 40
  */
41 41
 interface GroupInterface {
42 42
 
43
-	/**
44
-	 * Check if backend implements actions
45
-	 * @param int $actions bitwise-or'ed actions
46
-	 * @return boolean
47
-	 * @since 4.5.0
48
-	 *
49
-	 * Returns the supported actions as int to be
50
-	 * compared with \OC_Group_Backend::CREATE_GROUP etc.
51
-	 */
52
-	public function implementsActions($actions);
43
+    /**
44
+     * Check if backend implements actions
45
+     * @param int $actions bitwise-or'ed actions
46
+     * @return boolean
47
+     * @since 4.5.0
48
+     *
49
+     * Returns the supported actions as int to be
50
+     * compared with \OC_Group_Backend::CREATE_GROUP etc.
51
+     */
52
+    public function implementsActions($actions);
53 53
 
54
-	/**
55
-	 * is user in group?
56
-	 * @param string $uid uid of the user
57
-	 * @param string $gid gid of the group
58
-	 * @return bool
59
-	 * @since 4.5.0
60
-	 *
61
-	 * Checks whether the user is member of a group or not.
62
-	 */
63
-	public function inGroup($uid, $gid);
54
+    /**
55
+     * is user in group?
56
+     * @param string $uid uid of the user
57
+     * @param string $gid gid of the group
58
+     * @return bool
59
+     * @since 4.5.0
60
+     *
61
+     * Checks whether the user is member of a group or not.
62
+     */
63
+    public function inGroup($uid, $gid);
64 64
 
65
-	/**
66
-	 * Get all groups a user belongs to
67
-	 * @param string $uid Name of the user
68
-	 * @return array an array of group names
69
-	 * @since 4.5.0
70
-	 *
71
-	 * This function fetches all groups a user belongs to. It does not check
72
-	 * if the user exists at all.
73
-	 */
74
-	public function getUserGroups($uid);
65
+    /**
66
+     * Get all groups a user belongs to
67
+     * @param string $uid Name of the user
68
+     * @return array an array of group names
69
+     * @since 4.5.0
70
+     *
71
+     * This function fetches all groups a user belongs to. It does not check
72
+     * if the user exists at all.
73
+     */
74
+    public function getUserGroups($uid);
75 75
 
76
-	/**
77
-	 * get a list of all groups
78
-	 * @param string $search
79
-	 * @param int $limit
80
-	 * @param int $offset
81
-	 * @return array an array of group names
82
-	 * @since 4.5.0
83
-	 *
84
-	 * Returns a list with all groups
85
-	 */
86
-	public function getGroups($search = '', $limit = -1, $offset = 0);
76
+    /**
77
+     * get a list of all groups
78
+     * @param string $search
79
+     * @param int $limit
80
+     * @param int $offset
81
+     * @return array an array of group names
82
+     * @since 4.5.0
83
+     *
84
+     * Returns a list with all groups
85
+     */
86
+    public function getGroups($search = '', $limit = -1, $offset = 0);
87 87
 
88
-	/**
89
-	 * check if a group exists
90
-	 * @param string $gid
91
-	 * @return bool
92
-	 * @since 4.5.0
93
-	 */
94
-	public function groupExists($gid);
88
+    /**
89
+     * check if a group exists
90
+     * @param string $gid
91
+     * @return bool
92
+     * @since 4.5.0
93
+     */
94
+    public function groupExists($gid);
95 95
 
96
-	/**
97
-	 * get a list of all users in a group
98
-	 * @param string $gid
99
-	 * @param string $search
100
-	 * @param int $limit
101
-	 * @param int $offset
102
-	 * @return array an array of user ids
103
-	 * @since 4.5.0
104
-	 */
105
-	public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0);
96
+    /**
97
+     * get a list of all users in a group
98
+     * @param string $gid
99
+     * @param string $search
100
+     * @param int $limit
101
+     * @param int $offset
102
+     * @return array an array of user ids
103
+     * @since 4.5.0
104
+     */
105
+    public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0);
106 106
 
107 107
 }
Please login to merge, or discard this patch.