Completed
Pull Request — master (#4192)
by Christoph
15:02
created
lib/private/legacy/util.php 1 patch
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
 	private static function initLocalStorageRootFS() {
78 78
 		// mount local file backend as root
79
-		$configDataDirectory = \OC::$server->getSystemConfig()->getValue("datadirectory", OC::$SERVERROOT . "/data");
79
+		$configDataDirectory = \OC::$server->getSystemConfig()->getValue("datadirectory", OC::$SERVERROOT."/data");
80 80
 		//first set up the local "root" storage
81 81
 		\OC\Files\Filesystem::initMountManager();
82 82
 		if (!self::$rootMounted) {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 		\OC\Files\Filesystem::initMountManager();
155 155
 
156 156
 		\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false);
157
-		\OC\Files\Filesystem::addStorageWrapper('mount_options', function ($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) {
157
+		\OC\Files\Filesystem::addStorageWrapper('mount_options', function($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) {
158 158
 			if ($storage->instanceOfStorage('\OC\Files\Storage\Common')) {
159 159
 				/** @var \OC\Files\Storage\Common $storage */
160 160
 				$storage->setMountOptions($mount->getOptions());
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 			return $storage;
163 163
 		});
164 164
 
165
-		\OC\Files\Filesystem::addStorageWrapper('enable_sharing', function ($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) {
165
+		\OC\Files\Filesystem::addStorageWrapper('enable_sharing', function($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) {
166 166
 			if (!$mount->getOption('enable_sharing', true)) {
167 167
 				return new \OC\Files\Storage\Wrapper\PermissionsMask([
168 168
 					'storage' => $storage,
@@ -173,21 +173,21 @@  discard block
 block discarded – undo
173 173
 		});
174 174
 
175 175
 		// install storage availability wrapper, before most other wrappers
176
-		\OC\Files\Filesystem::addStorageWrapper('oc_availability', function ($mountPoint, $storage) {
176
+		\OC\Files\Filesystem::addStorageWrapper('oc_availability', function($mountPoint, $storage) {
177 177
 			if (!$storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage') && !$storage->isLocal()) {
178 178
 				return new \OC\Files\Storage\Wrapper\Availability(['storage' => $storage]);
179 179
 			}
180 180
 			return $storage;
181 181
 		});
182 182
 
183
-		\OC\Files\Filesystem::addStorageWrapper('oc_encoding', function ($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) {
183
+		\OC\Files\Filesystem::addStorageWrapper('oc_encoding', function($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) {
184 184
 			if ($mount->getOption('encoding_compatibility', false) && !$storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage') && !$storage->isLocal()) {
185 185
 				return new \OC\Files\Storage\Wrapper\Encoding(['storage' => $storage]);
186 186
 			}
187 187
 			return $storage;
188 188
 		});
189 189
 
190
-		\OC\Files\Filesystem::addStorageWrapper('oc_quota', function ($mountPoint, $storage) {
190
+		\OC\Files\Filesystem::addStorageWrapper('oc_quota', function($mountPoint, $storage) {
191 191
 			// set up quota for home storages, even for other users
192 192
 			// which can happen when using sharing
193 193
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 		//if we aren't logged in, there is no use to set up the filesystem
230 230
 		if ($user != "") {
231 231
 
232
-			$userDir = '/' . $user . '/files';
232
+			$userDir = '/'.$user.'/files';
233 233
 
234 234
 			//jail the user into his "home" directory
235 235
 			\OC\Files\Filesystem::init($user, $userDir);
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 			return \OCP\Files\FileInfo::SPACE_UNLIMITED;
309 309
 		}
310 310
 		$userQuota = $user->getQuota();
311
-		if($userQuota === 'none') {
311
+		if ($userQuota === 'none') {
312 312
 			return \OCP\Files\FileInfo::SPACE_UNLIMITED;
313 313
 		}
314 314
 		return OC_Helper::computerFileSize($userQuota);
@@ -323,15 +323,15 @@  discard block
 block discarded – undo
323 323
 	 */
324 324
 	public static function copySkeleton($userId, \OCP\Files\Folder $userDirectory) {
325 325
 
326
-		$skeletonDirectory = \OC::$server->getConfig()->getSystemValue('skeletondirectory', \OC::$SERVERROOT . '/core/skeleton');
326
+		$skeletonDirectory = \OC::$server->getConfig()->getSystemValue('skeletondirectory', \OC::$SERVERROOT.'/core/skeleton');
327 327
 		$instanceId = \OC::$server->getConfig()->getSystemValue('instanceid', '');
328 328
 
329 329
 		if ($instanceId === null) {
330 330
 			throw new \RuntimeException('no instance id!');
331 331
 		}
332
-		$appdata = 'appdata_' . $instanceId;
332
+		$appdata = 'appdata_'.$instanceId;
333 333
 		if ($userId === $appdata) {
334
-			throw new \RuntimeException('username is reserved name: ' . $appdata);
334
+			throw new \RuntimeException('username is reserved name: '.$appdata);
335 335
 		}
336 336
 
337 337
 		if (!empty($skeletonDirectory)) {
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 
359 359
 		// Verify if folder exists
360 360
 		$dir = opendir($source);
361
-		if($dir === false) {
361
+		if ($dir === false) {
362 362
 			$logger->error(sprintf('Could not opendir "%s"', $source), ['app' => 'core']);
363 363
 			return;
364 364
 		}
@@ -366,14 +366,14 @@  discard block
 block discarded – undo
366 366
 		// Copy the files
367 367
 		while (false !== ($file = readdir($dir))) {
368 368
 			if (!\OC\Files\Filesystem::isIgnoredDir($file)) {
369
-				if (is_dir($source . '/' . $file)) {
369
+				if (is_dir($source.'/'.$file)) {
370 370
 					$child = $target->newFolder($file);
371
-					self::copyr($source . '/' . $file, $child);
371
+					self::copyr($source.'/'.$file, $child);
372 372
 				} else {
373 373
 					$child = $target->newFile($file);
374
-					$sourceStream = fopen($source . '/' . $file, 'r');
375
-					if($sourceStream === false) {
376
-						$logger->error(sprintf('Could not fopen "%s"', $source . '/' . $file), ['app' => 'core']);
374
+					$sourceStream = fopen($source.'/'.$file, 'r');
375
+					if ($sourceStream === false) {
376
+						$logger->error(sprintf('Could not fopen "%s"', $source.'/'.$file), ['app' => 'core']);
377 377
 						closedir($dir);
378 378
 						return;
379 379
 					}
@@ -448,8 +448,8 @@  discard block
 block discarded – undo
448 448
 			return;
449 449
 		}
450 450
 
451
-		$timestamp = filemtime(OC::$SERVERROOT . '/version.php');
452
-		require OC::$SERVERROOT . '/version.php';
451
+		$timestamp = filemtime(OC::$SERVERROOT.'/version.php');
452
+		require OC::$SERVERROOT.'/version.php';
453 453
 		/** @var $timestamp int */
454 454
 		self::$versionCache['OC_Version_Timestamp'] = $timestamp;
455 455
 		/** @var $OC_Version string */
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
 
497 497
 		// core js files need separate handling
498 498
 		if ($application !== 'core' && $file !== null) {
499
-			self::addTranslations ( $application );
499
+			self::addTranslations($application);
500 500
 		}
501 501
 		self::addExternalResource($application, $prepend, $path, "script");
502 502
 	}
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 		if ($type === "style") {
574 574
 			if (!in_array($path, self::$styles)) {
575 575
 				if ($prepend === true) {
576
-					array_unshift ( self::$styles, $path );
576
+					array_unshift(self::$styles, $path);
577 577
 				} else {
578 578
 					self::$styles[] = $path;
579 579
 				}
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 		} elseif ($type === "script") {
582 582
 			if (!in_array($path, self::$scripts)) {
583 583
 				if ($prepend === true) {
584
-					array_unshift ( self::$scripts, $path );
584
+					array_unshift(self::$scripts, $path);
585 585
 				} else {
586 586
 					self::$scripts [] = $path;
587 587
 				}
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 	 * @param array $attributes array of attributes for the element
598 598
 	 * @param string $text the text content for the element
599 599
 	 */
600
-	public static function addHeader($tag, $attributes, $text=null) {
600
+	public static function addHeader($tag, $attributes, $text = null) {
601 601
 		self::$headers[] = array(
602 602
 			'tag' => $tag,
603 603
 			'attributes' => $attributes,
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 	public static function checkServer(\OC\SystemConfig $config) {
638 638
 		$l = \OC::$server->getL10N('lib');
639 639
 		$errors = array();
640
-		$CONFIG_DATADIRECTORY = $config->getValue('datadirectory', OC::$SERVERROOT . '/data');
640
+		$CONFIG_DATADIRECTORY = $config->getValue('datadirectory', OC::$SERVERROOT.'/data');
641 641
 
642 642
 		if (!self::needUpgrade($config) && $config->getValue('installed', false)) {
643 643
 			// this check needs to be done every time
@@ -665,13 +665,13 @@  discard block
 block discarded – undo
665 665
 		}
666 666
 
667 667
 		// Check if config folder is writable.
668
-		if(!OC_Helper::isReadOnlyConfigEnabled()) {
668
+		if (!OC_Helper::isReadOnlyConfigEnabled()) {
669 669
 			if (!is_writable(OC::$configDir) or !is_readable(OC::$configDir)) {
670 670
 				$errors[] = array(
671 671
 					'error' => $l->t('Cannot write into "config" directory'),
672 672
 					'hint' => $l->t('This can usually be fixed by '
673 673
 						. '%sgiving the webserver write access to the config directory%s.',
674
-						array('<a href="' . $urlGenerator->linkToDocs('admin-dir_permissions') . '" target="_blank" rel="noreferrer">', '</a>'))
674
+						array('<a href="'.$urlGenerator->linkToDocs('admin-dir_permissions').'" target="_blank" rel="noreferrer">', '</a>'))
675 675
 				);
676 676
 			}
677 677
 		}
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 					'hint' => $l->t('This can usually be fixed by '
688 688
 						. '%sgiving the webserver write access to the apps directory%s'
689 689
 						. ' or disabling the appstore in the config file.',
690
-						array('<a href="' . $urlGenerator->linkToDocs('admin-dir_permissions') . '" target="_blank" rel="noreferrer">', '</a>'))
690
+						array('<a href="'.$urlGenerator->linkToDocs('admin-dir_permissions').'" target="_blank" rel="noreferrer">', '</a>'))
691 691
 				);
692 692
 			}
693 693
 		}
@@ -709,9 +709,9 @@  discard block
 block discarded – undo
709 709
 				//common hint for all file permissions error messages
710 710
 				$permissionsHint = $l->t('Permissions can usually be fixed by '
711 711
 					. '%sgiving the webserver write access to the root directory%s.',
712
-					array('<a href="' . $urlGenerator->linkToDocs('admin-dir_permissions') . '" target="_blank" rel="noreferrer">', '</a>'));
712
+					array('<a href="'.$urlGenerator->linkToDocs('admin-dir_permissions').'" target="_blank" rel="noreferrer">', '</a>'));
713 713
 				$errors[] = array(
714
-					'error' => 'Data directory (' . $CONFIG_DATADIRECTORY . ') not writable',
714
+					'error' => 'Data directory ('.$CONFIG_DATADIRECTORY.') not writable',
715 715
 					'hint' => $permissionsHint
716 716
 				);
717 717
 			} else {
@@ -809,15 +809,15 @@  discard block
 block discarded – undo
809 809
 			}
810 810
 		}
811 811
 
812
-		foreach($missingDependencies as $missingDependency) {
812
+		foreach ($missingDependencies as $missingDependency) {
813 813
 			$errors[] = array(
814 814
 				'error' => $l->t('PHP module %s not installed.', array($missingDependency)),
815 815
 				'hint' => $moduleHint
816 816
 			);
817 817
 			$webServerRestart = true;
818 818
 		}
819
-		foreach($invalidIniSettings as $setting) {
820
-			if(is_bool($setting[1])) {
819
+		foreach ($invalidIniSettings as $setting) {
820
+			if (is_bool($setting[1])) {
821 821
 				$setting[1] = ($setting[1]) ? 'on' : 'off';
822 822
 			}
823 823
 			$errors[] = [
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
 		 * TODO: Should probably be implemented in the above generic dependency
836 836
 		 *       check somehow in the long-term.
837 837
 		 */
838
-		if($iniWrapper->getBool('mbstring.func_overload') !== null &&
838
+		if ($iniWrapper->getBool('mbstring.func_overload') !== null &&
839 839
 			$iniWrapper->getBool('mbstring.func_overload') === true) {
840 840
 			$errors[] = array(
841 841
 				'error' => $l->t('mbstring.func_overload is set to "%s" instead of the expected value "0"', [$iniWrapper->getString('mbstring.func_overload')]),
@@ -843,16 +843,16 @@  discard block
 block discarded – undo
843 843
 			);
844 844
 		}
845 845
 
846
-		if(function_exists('xml_parser_create') &&
847
-			LIBXML_LOADED_VERSION < 20700 ) {
846
+		if (function_exists('xml_parser_create') &&
847
+			LIBXML_LOADED_VERSION < 20700) {
848 848
 			$version = LIBXML_LOADED_VERSION;
849
-			$major = floor($version/10000);
849
+			$major = floor($version / 10000);
850 850
 			$version -= ($major * 10000);
851
-			$minor = floor($version/100);
851
+			$minor = floor($version / 100);
852 852
 			$version -= ($minor * 100);
853 853
 			$patch = $version;
854 854
 			$errors[] = array(
855
-				'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [$major . '.' . $minor . '.' . $patch]),
855
+				'error' => $l->t('libxml2 2.7.0 is at least required. Currently %s is installed.', [$major.'.'.$minor.'.'.$patch]),
856 856
 				'hint' => $l->t('To fix this issue update your libxml2 version and restart your web server.')
857 857
 			);
858 858
 		}
@@ -953,10 +953,10 @@  discard block
 block discarded – undo
953 953
 				'hint' => $l->t('Check the value of "datadirectory" in your configuration')
954 954
 			];
955 955
 		}
956
-		if (!file_exists($dataDirectory . '/.ocdata')) {
956
+		if (!file_exists($dataDirectory.'/.ocdata')) {
957 957
 			$errors[] = [
958 958
 				'error' => $l->t('Data directory (%s) is invalid', [$dataDirectory]),
959
-				'hint' => $l->t('Please check that the data directory contains a file' .
959
+				'hint' => $l->t('Please check that the data directory contains a file'.
960 960
 					' ".ocdata" in its root.')
961 961
 			];
962 962
 		}
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
 	public static function checkLoggedIn() {
973 973
 		// Check if we are a user
974 974
 		if (!\OC::$server->getUserSession()->isLoggedIn()) {
975
-			header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute(
975
+			header('Location: '.\OC::$server->getURLGenerator()->linkToRoute(
976 976
 						'core.login.showLoginForm',
977 977
 						[
978 978
 							'redirect_url' => \OC::$server->getRequest()->getRequestUri(),
@@ -983,7 +983,7 @@  discard block
 block discarded – undo
983 983
 		}
984 984
 		// Redirect to 2FA challenge selection if 2FA challenge was not solved yet
985 985
 		if (\OC::$server->getTwoFactorAuthManager()->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
986
-			header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
986
+			header('Location: '.\OC::$server->getURLGenerator()->linkToRoute('core.TwoFactorChallenge.selectChallenge'));
987 987
 			exit();
988 988
 		}
989 989
 	}
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
 	public static function checkAdminUser() {
997 997
 		OC_Util::checkLoggedIn();
998 998
 		if (!OC_User::isAdminUser(OC_User::getUser())) {
999
-			header('Location: ' . \OCP\Util::linkToAbsolute('', 'index.php'));
999
+			header('Location: '.\OCP\Util::linkToAbsolute('', 'index.php'));
1000 1000
 			exit();
1001 1001
 		}
1002 1002
 	}
@@ -1010,12 +1010,12 @@  discard block
 block discarded – undo
1010 1010
 		OC_Util::checkLoggedIn();
1011 1011
 		$userObject = \OC::$server->getUserSession()->getUser();
1012 1012
 		$isSubAdmin = false;
1013
-		if($userObject !== null) {
1013
+		if ($userObject !== null) {
1014 1014
 			$isSubAdmin = \OC::$server->getGroupManager()->getSubAdmin()->isSubAdmin($userObject);
1015 1015
 		}
1016 1016
 
1017 1017
 		if (!$isSubAdmin) {
1018
-			header('Location: ' . \OCP\Util::linkToAbsolute('', 'index.php'));
1018
+			header('Location: '.\OCP\Util::linkToAbsolute('', 'index.php'));
1019 1019
 			exit();
1020 1020
 		}
1021 1021
 		return true;
@@ -1050,10 +1050,10 @@  discard block
 block discarded – undo
1050 1050
 					}
1051 1051
 				}
1052 1052
 
1053
-				if(\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true') {
1054
-					$location = $urlGenerator->getAbsoluteURL('/apps/' . $appId . '/');
1053
+				if (\OC::$server->getConfig()->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true') {
1054
+					$location = $urlGenerator->getAbsoluteURL('/apps/'.$appId.'/');
1055 1055
 				} else {
1056
-					$location = $urlGenerator->getAbsoluteURL('/index.php/apps/' . $appId . '/');
1056
+					$location = $urlGenerator->getAbsoluteURL('/index.php/apps/'.$appId.'/');
1057 1057
 				}
1058 1058
 			}
1059 1059
 		}
@@ -1067,7 +1067,7 @@  discard block
 block discarded – undo
1067 1067
 	 */
1068 1068
 	public static function redirectToDefaultPage() {
1069 1069
 		$location = self::getDefaultPageUrl();
1070
-		header('Location: ' . $location);
1070
+		header('Location: '.$location);
1071 1071
 		exit();
1072 1072
 	}
1073 1073
 
@@ -1080,7 +1080,7 @@  discard block
 block discarded – undo
1080 1080
 		$id = \OC::$server->getSystemConfig()->getValue('instanceid', null);
1081 1081
 		if (is_null($id)) {
1082 1082
 			// We need to guarantee at least one letter in instanceid so it can be used as the session_name
1083
-			$id = 'oc' . \OC::$server->getSecureRandom()->generate(10, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS);
1083
+			$id = 'oc'.\OC::$server->getSecureRandom()->generate(10, \OCP\Security\ISecureRandom::CHAR_LOWER.\OCP\Security\ISecureRandom::CHAR_DIGITS);
1084 1084
 			\OC::$server->getSystemConfig()->setValue('instanceid', $id);
1085 1085
 		}
1086 1086
 		return $id;
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
 			}, $value);
1103 1103
 		} else {
1104 1104
 			// Specify encoding for PHP<5.4
1105
-			$value = htmlspecialchars((string)$value, ENT_QUOTES, 'UTF-8');
1105
+			$value = htmlspecialchars((string) $value, ENT_QUOTES, 'UTF-8');
1106 1106
 		}
1107 1107
 		return $value;
1108 1108
 	}
@@ -1135,7 +1135,7 @@  discard block
 block discarded – undo
1135 1135
 		$testContent = 'This is used for testing whether htaccess is properly enabled to disallow access from the outside. This file can be safely removed.';
1136 1136
 
1137 1137
 		// creating a test file
1138
-		$testFile = $config->getSystemValue('datadirectory', OC::$SERVERROOT . '/data') . '/' . $fileName;
1138
+		$testFile = $config->getSystemValue('datadirectory', OC::$SERVERROOT.'/data').'/'.$fileName;
1139 1139
 
1140 1140
 		if (file_exists($testFile)) {// already running this test, possible recursive call
1141 1141
 			return false;
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
 		$fp = @fopen($testFile, 'w');
1145 1145
 		if (!$fp) {
1146 1146
 			throw new OC\HintException('Can\'t create test file to check for working .htaccess file.',
1147
-				'Make sure it is possible for the webserver to write to ' . $testFile);
1147
+				'Make sure it is possible for the webserver to write to '.$testFile);
1148 1148
 		}
1149 1149
 		fwrite($fp, $testContent);
1150 1150
 		fclose($fp);
@@ -1171,10 +1171,10 @@  discard block
 block discarded – undo
1171 1171
 		}
1172 1172
 
1173 1173
 		$fileName = '/htaccesstest.txt';
1174
-		$testFile = $config->getSystemValue('datadirectory', OC::$SERVERROOT . '/data') . '/' . $fileName;
1174
+		$testFile = $config->getSystemValue('datadirectory', OC::$SERVERROOT.'/data').'/'.$fileName;
1175 1175
 
1176 1176
 		// accessing the file via http
1177
-		$url = \OC::$server->getURLGenerator()->getAbsoluteURL(OC::$WEBROOT . '/data' . $fileName);
1177
+		$url = \OC::$server->getURLGenerator()->getAbsoluteURL(OC::$WEBROOT.'/data'.$fileName);
1178 1178
 		try {
1179 1179
 			$content = \OC::$server->getHTTPClientService()->newClient()->get($url)->getBody();
1180 1180
 		} catch (\Exception $e) {
@@ -1265,7 +1265,7 @@  discard block
 block discarded – undo
1265 1265
 		$theme = \OC::$server->getSystemConfig()->getValue("theme", '');
1266 1266
 
1267 1267
 		if ($theme === '') {
1268
-			if (is_dir(OC::$SERVERROOT . '/themes/default')) {
1268
+			if (is_dir(OC::$SERVERROOT.'/themes/default')) {
1269 1269
 				$theme = 'default';
1270 1270
 			}
1271 1271
 		}
@@ -1336,13 +1336,13 @@  discard block
 block discarded – undo
1336 1336
 	 * @return bool|string
1337 1337
 	 */
1338 1338
 	public static function normalizeUnicode($value) {
1339
-		if(Normalizer::isNormalized($value)) {
1339
+		if (Normalizer::isNormalized($value)) {
1340 1340
 			return $value;
1341 1341
 		}
1342 1342
 
1343 1343
 		$normalizedValue = Normalizer::normalize($value);
1344 1344
 		if ($normalizedValue === null || $normalizedValue === false) {
1345
-			\OC::$server->getLogger()->warning('normalizing failed for "' . $value . '"', ['app' => 'core']);
1345
+			\OC::$server->getLogger()->warning('normalizing failed for "'.$value.'"', ['app' => 'core']);
1346 1346
 			return $value;
1347 1347
 		}
1348 1348
 
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
 		$version = OC_Util::getVersionString();
1369 1369
 		$build = OC_Util::getBuild();
1370 1370
 		if (!empty($build) and OC_Util::getChannel() === 'daily') {
1371
-			$version .= ' Build:' . $build;
1371
+			$version .= ' Build:'.$build;
1372 1372
 		}
1373 1373
 		return $version;
1374 1374
 	}
@@ -1415,19 +1415,19 @@  discard block
 block discarded – undo
1415 1415
 			} else if ($config->getValue('debug', false) && $versionDiff < 0) {
1416 1416
 				// downgrade with debug
1417 1417
 				$installedMajor = explode('.', $installedVersion);
1418
-				$installedMajor = $installedMajor[0] . '.' . $installedMajor[1];
1418
+				$installedMajor = $installedMajor[0].'.'.$installedMajor[1];
1419 1419
 				$currentMajor = explode('.', $currentVersion);
1420
-				$currentMajor = $currentMajor[0] . '.' . $currentMajor[1];
1420
+				$currentMajor = $currentMajor[0].'.'.$currentMajor[1];
1421 1421
 				if ($installedMajor === $currentMajor) {
1422 1422
 					// Same major, allow downgrade for developers
1423 1423
 					return true;
1424 1424
 				} else {
1425 1425
 					// downgrade attempt, throw exception
1426
-					throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')');
1426
+					throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from '.$installedVersion.' to '.$currentVersion.')');
1427 1427
 				}
1428 1428
 			} else if ($versionDiff < 0) {
1429 1429
 				// downgrade attempt, throw exception
1430
-				throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from ' . $installedVersion . ' to ' . $currentVersion . ')');
1430
+				throw new \OC\HintException('Downgrading is not supported and is likely to cause unpredictable issues (from '.$installedVersion.' to '.$currentVersion.')');
1431 1431
 			}
1432 1432
 
1433 1433
 			// also check for upgrades for apps (independently from the user)
Please login to merge, or discard this patch.