Completed
Pull Request — master (#4890)
by Blizzz
14:37
created
lib/private/Mail/Message.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@
 block discarded – undo
55 55
 
56 56
 		$convertedAddresses = array();
57 57
 
58
-		foreach($addresses as $email => $readableName) {
59
-			if(!is_numeric($email)) {
58
+		foreach ($addresses as $email => $readableName) {
59
+			if (!is_numeric($email)) {
60 60
 				list($name, $domain) = explode('@', $email, 2);
61 61
 				$domain = idn_to_ascii($domain);
62 62
 				$convertedAddresses[$name.'@'.$domain] = $readableName;
Please login to merge, or discard this patch.
lib/private/Mail/Mailer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 		$mailer = $this->getInstance();
99 99
 
100 100
 		// Enable logger if debug mode is enabled
101
-		if($debugMode) {
101
+		if ($debugMode) {
102 102
 			$mailLogger = new \Swift_Plugins_Loggers_ArrayLogger();
103 103
 			$mailer->registerPlugin(new \Swift_Plugins_LoggerPlugin($mailLogger));
104 104
 		}
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 		// Debugging logging
109 109
 		$logMessage = sprintf('Sent mail to "%s" with subject "%s"', print_r($message->getTo(), true), $message->getSubject());
110 110
 		$this->logger->debug($logMessage, ['app' => 'core']);
111
-		if($debugMode && isset($mailLogger)) {
111
+		if ($debugMode && isset($mailLogger)) {
112 112
 			$this->logger->debug($mailLogger->dump(), ['app' => 'core']);
113 113
 		}
114 114
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 				break;
210 210
 		}
211 211
 
212
-		return \Swift_SendmailTransport::newInstance($binaryPath . ' -bs');
212
+		return \Swift_SendmailTransport::newInstance($binaryPath.' -bs');
213 213
 	}
214 214
 
215 215
 	/**
Please login to merge, or discard this patch.
lib/private/CapabilitiesManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	public function getCapabilities() {
48 48
 		$capabilities = [];
49
-		foreach($this->capabilities as $capability) {
49
+		foreach ($this->capabilities as $capability) {
50 50
 			try {
51 51
 				$c = $capability();
52 52
 			} catch (QueryException $e) {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 			if ($c instanceof ICapability) {
58 58
 				$capabilities = array_replace_recursive($capabilities, $c->getCapabilities());
59 59
 			} else {
60
-				throw new \InvalidArgumentException('The given Capability (' . get_class($c) . ') does not implement the ICapability interface');
60
+				throw new \InvalidArgumentException('The given Capability ('.get_class($c).') does not implement the ICapability interface');
61 61
 			}
62 62
 		}
63 63
 
Please login to merge, or discard this patch.
lib/private/Share/Helper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
 			$params = array();
94 94
 			if (count($ids) == 1 && isset($uidOwner)) {
95 95
 				// FIXME: don't concat $parents, use Docrine's PARAM_INT_ARRAY approach
96
-				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, ' .
97
-					'`item_target`, `file_target`, `parent` ' .
98
-					'FROM `*PREFIX*share` ' .
96
+				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, '.
97
+					'`item_target`, `file_target`, `parent` '.
98
+					'FROM `*PREFIX*share` '.
99 99
 					'WHERE `parent` IN ('.$parents.') AND `uid_owner` = ? ';
100 100
 				$params[] = $uidOwner;
101 101
 			} else {
102
-				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, ' .
103
-					'`item_target`, `file_target`, `parent`, `uid_owner` ' .
102
+				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, '.
103
+					'`item_target`, `file_target`, `parent`, `uid_owner` '.
104 104
 					'FROM `*PREFIX*share` WHERE `parent` IN ('.$parents.') ';
105 105
 			}
106 106
 			if ($excludeGroupChildren) {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 					'shareWith' => $item['share_with'],
118 118
 					'itemTarget' => $item['item_target'],
119 119
 					'itemType' => $item['item_type'],
120
-					'shareType' => (int)$item['share_type'],
120
+					'shareType' => (int) $item['share_type'],
121 121
 				);
122 122
 				if (isset($item['file_target'])) {
123 123
 					$tmpItem['fileTarget'] = $item['file_target'];
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 		if ($defaultExpireDate === 'yes') {
169 169
 			$enforceExpireDate = $config->getAppValue('core', 'shareapi_enforce_expire_date', 'no');
170 170
 			$defaultExpireSettings['defaultExpireDateSet'] = true;
171
-			$defaultExpireSettings['expireAfterDays'] = (int)($config->getAppValue('core', 'shareapi_expire_after_n_days', '7'));
171
+			$defaultExpireSettings['expireAfterDays'] = (int) ($config->getAppValue('core', 'shareapi_expire_after_n_days', '7'));
172 172
 			$defaultExpireSettings['enforceExpireDate'] = $enforceExpireDate === 'yes' ? true : false;
173 173
 		}
174 174
 
Please login to merge, or discard this patch.
lib/private/Share/SearchResultSorter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
 	 * Callback function for usort. http://php.net/usort
52 52
 	 */
53 53
 	public function sort($a, $b) {
54
-		if(!isset($a[$this->key]) || !isset($b[$this->key])) {
55
-			if(!is_null($this->log)) {
56
-				$this->log->error('Sharing dialogue: cannot sort due to ' .
54
+		if (!isset($a[$this->key]) || !isset($b[$this->key])) {
55
+			if (!is_null($this->log)) {
56
+				$this->log->error('Sharing dialogue: cannot sort due to '.
57 57
 								  'missing array key', array('app' => 'core'));
58 58
 			}
59 59
 			return 0;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 		$i = mb_strpos($nameA, $this->search, 0, $this->encoding);
64 64
 		$j = mb_strpos($nameB, $this->search, 0, $this->encoding);
65 65
 
66
-		if($i === $j || $i > 0 && $j > 0) {
66
+		if ($i === $j || $i > 0 && $j > 0) {
67 67
 			return strcmp(mb_strtolower($nameA, $this->encoding),
68 68
 						  mb_strtolower($nameB, $this->encoding));
69 69
 		} elseif ($i === 0) {
Please login to merge, or discard this patch.
lib/private/Share/Constants.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
 	const FORMAT_NONE = -1;
37 37
 	const FORMAT_STATUSES = -2;
38
-	const FORMAT_SOURCES = -3;  // ToDo Check if it is still in use otherwise remove it
38
+	const FORMAT_SOURCES = -3; // ToDo Check if it is still in use otherwise remove it
39 39
 
40 40
 	const RESPONSE_FORMAT = 'json'; // default resonse format for ocs calls
41 41
 
Please login to merge, or discard this patch.
lib/private/Repair/MoveUpdaterStepFile.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -44,23 +44,23 @@  discard block
 block discarded – undo
44 44
 
45 45
 	public function run(IOutput $output) {
46 46
 
47
-		$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
47
+		$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data');
48 48
 		$instanceId = $this->config->getSystemValue('instanceid', null);
49 49
 
50
-		if(!is_string($instanceId) || empty($instanceId)) {
50
+		if (!is_string($instanceId) || empty($instanceId)) {
51 51
 			return;
52 52
 		}
53 53
 
54
-		$updaterFolderPath = $dataDir . '/updater-' . $instanceId;
55
-		$stepFile = $updaterFolderPath . '/.step';
56
-		if(file_exists($stepFile)) {
54
+		$updaterFolderPath = $dataDir.'/updater-'.$instanceId;
55
+		$stepFile = $updaterFolderPath.'/.step';
56
+		if (file_exists($stepFile)) {
57 57
 			$output->info('.step file exists');
58 58
 
59
-			$previousStepFile = $updaterFolderPath . '/.step-previous-update';
59
+			$previousStepFile = $updaterFolderPath.'/.step-previous-update';
60 60
 
61 61
 			// cleanup
62
-			if(file_exists($previousStepFile)) {
63
-				if(\OC_Helper::rmdirr($previousStepFile)) {
62
+			if (file_exists($previousStepFile)) {
63
+				if (\OC_Helper::rmdirr($previousStepFile)) {
64 64
 					$output->info('.step-previous-update removed');
65 65
 				} else {
66 66
 					$output->info('.step-previous-update can\'t be removed - abort move of .step file');
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 			}
70 70
 
71 71
 			// move step file
72
-			if(rename($stepFile, $previousStepFile)) {
72
+			if (rename($stepFile, $previousStepFile)) {
73 73
 				$output->info('.step file moved to .step-previous-update');
74 74
 			} else {
75 75
 				$output->warning('.step file can\'t be moved');
Please login to merge, or discard this patch.
lib/private/Repair/NC11/CleanPreviews.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 
65 65
 	public function run(IOutput $output) {
66 66
 		if (!$this->config->getAppValue('core', 'previewsCleanedUp', false)) {
67
-			$this->userManager->callForSeenUsers(function (IUser $user) {
67
+			$this->userManager->callForSeenUsers(function(IUser $user) {
68 68
 				$this->jobList->add(CleanPreviewsBackgroundJob::class, ['uid' => $user->getUID()]);
69 69
 			});
70 70
 			$this->config->setAppValue('core', 'previewsCleanedUp', 1);
Please login to merge, or discard this patch.
lib/private/Repair/NC11/CleanPreviewsBackgroundJob.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,14 +64,14 @@
 block discarded – undo
64 64
 
65 65
 	public function run($arguments) {
66 66
 		$uid = $arguments['uid'];
67
-		$this->logger->info('Started preview cleanup for ' . $uid);
67
+		$this->logger->info('Started preview cleanup for '.$uid);
68 68
 		$empty = $this->cleanupPreviews($uid);
69 69
 
70 70
 		if (!$empty) {
71 71
 			$this->jobList->add(self::class, ['uid' => $uid]);
72
-			$this->logger->info('New preview cleanup scheduled for ' . $uid);
72
+			$this->logger->info('New preview cleanup scheduled for '.$uid);
73 73
 		} else {
74
-			$this->logger->info('Preview cleanup done for ' . $uid);
74
+			$this->logger->info('Preview cleanup done for '.$uid);
75 75
 		}
76 76
 	}
77 77
 
Please login to merge, or discard this patch.