Passed
Push — master ( b93e1e...342765 )
by Roeland
34:24 queued 23:05
created
lib/private/Collaboration/Collaborators/SearchResult.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
 
38 38
 	public function addResultSet(SearchResultType $type, array $matches, array $exactMatches = null) {
39 39
 		$type = $type->getLabel();
40
-		if(!isset($this->result[$type])) {
40
+		if (!isset($this->result[$type])) {
41 41
 			$this->result[$type] = [];
42 42
 			$this->result['exact'][$type] = [];
43 43
 		}
44 44
 
45 45
 		$this->result[$type] = array_merge($this->result[$type], $matches);
46
-		if(is_array($exactMatches)) {
46
+		if (is_array($exactMatches)) {
47 47
 			$this->result['exact'][$type] = array_merge($this->result['exact'][$type], $exactMatches);
48 48
 		}
49 49
 	}
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
 
59 59
 	public function hasResult(SearchResultType $type, $collaboratorId) {
60 60
 		$type = $type->getLabel();
61
-		if(!isset($this->result[$type])) {
61
+		if (!isset($this->result[$type])) {
62 62
 			return false;
63 63
 		}
64 64
 
65 65
 		$resultArrays = [$this->result['exact'][$type], $this->result[$type]];
66
-		foreach($resultArrays as $resultArray) {
66
+		foreach ($resultArrays as $resultArray) {
67 67
 			foreach ($resultArray as $result) {
68 68
 				if ($result['value']['shareWith'] === $collaboratorId) {
69 69
 					return true;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	public function unsetResult(SearchResultType $type) {
82 82
 		$type = $type->getLabel();
83 83
 		$this->result[$type] = [];
84
-		if(isset($this->result['exact'][$type])) {
84
+		if (isset($this->result['exact'][$type])) {
85 85
 			$this->result['exact'][$type] = [];
86 86
 		}
87 87
 	}
Please login to merge, or discard this patch.
apps/user_ldap/appinfo/app.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
 $helper = new \OCA\User_LDAP\Helper(\OC::$server->getConfig());
40 40
 $configPrefixes = $helper->getServerConfigurationPrefixes(true);
41
-if(count($configPrefixes) > 0) {
41
+if (count($configPrefixes) > 0) {
42 42
 	$ldapWrapper = new OCA\User_LDAP\LDAP();
43 43
 	$ocConfig = \OC::$server->getConfig();
44 44
 	$notificationManager = \OC::$server->getNotificationManager();
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
 	$userPluginManager = \OC::$server->query('LDAPUserPluginManager');
59 59
 	$groupPluginManager = \OC::$server->query('LDAPGroupPluginManager');
60 60
 
61
-	$userBackend  = new OCA\User_LDAP\User_Proxy(
61
+	$userBackend = new OCA\User_LDAP\User_Proxy(
62 62
 		$configPrefixes, $ldapWrapper, $ocConfig, $notificationManager, $userSession, $userPluginManager
63 63
 	);
64
-	$groupBackend  = new OCA\User_LDAP\Group_Proxy($configPrefixes, $ldapWrapper, $groupPluginManager);
64
+	$groupBackend = new OCA\User_LDAP\Group_Proxy($configPrefixes, $ldapWrapper, $groupPluginManager);
65 65
 	// register user backend
66 66
 	OC_User::useBackend($userBackend);
67 67
 
Please login to merge, or discard this patch.
apps/comments/lib/JSSettingsHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 	public function extend(array $settings) {
38 38
 		$appConfig = json_decode($settings['array']['oc_appconfig'], true);
39 39
 
40
-		$value = (int)$this->c->getConfig()->getAppValue('comments', 'maxAutoCompleteResults', 10);
40
+		$value = (int) $this->c->getConfig()->getAppValue('comments', 'maxAutoCompleteResults', 10);
41 41
 		$appConfig['comments']['maxAutoCompleteResults'] = $value;
42 42
 
43 43
 		$settings['array']['oc_appconfig'] = json_encode($appConfig);
Please login to merge, or discard this patch.
apps/files_sharing/lib/Collaboration/ShareRecipientSorter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -52,23 +52,23 @@  discard block
 block discarded – undo
52 52
 
53 53
 	public function sort(array &$sortArray, array $context) {
54 54
 		// let's be tolerant. Comments  uses "files" by default, other usages are often singular
55
-		if($context['itemType'] !== 'files' && $context['itemType'] !== 'file') {
55
+		if ($context['itemType'] !== 'files' && $context['itemType'] !== 'file') {
56 56
 			return;
57 57
 		}
58 58
 		$user = $this->userSession->getUser();
59
-		if($user === null) {
59
+		if ($user === null) {
60 60
 			return;
61 61
 		}
62 62
 		$userFolder = $this->rootFolder->getUserFolder($user->getUID());
63 63
 		/** @var Node[] $nodes */
64
-		$nodes = $userFolder->getById((int)$context['itemId']);
65
-		if(count($nodes) === 0) {
64
+		$nodes = $userFolder->getById((int) $context['itemId']);
65
+		if (count($nodes) === 0) {
66 66
 			return;
67 67
 		}
68 68
 		$al = $this->shareManager->getAccessList($nodes[0]);
69 69
 
70 70
 		foreach ($sortArray as $type => &$byType) {
71
-			if(!isset($al[$type]) || !is_array($al[$type])) {
71
+			if (!isset($al[$type]) || !is_array($al[$type])) {
72 72
 				continue;
73 73
 			}
74 74
 
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
 				return [$i++, $element];
80 80
 			}, $byType);
81 81
 
82
-			usort($workArray, function ($a, $b) use ($al, $type) {
82
+			usort($workArray, function($a, $b) use ($al, $type) {
83 83
 				$result = $this->compare($a[1], $b[1], $al[$type]);
84
-				if($result === 0) {
84
+				if ($result === 0) {
85 85
 					$result = $a[0] - $b[0];
86 86
 				}
87 87
 				return $result;
@@ -102,8 +102,8 @@  discard block
 block discarded – undo
102 102
 		$a = $a['value']['shareWith'];
103 103
 		$b = $b['value']['shareWith'];
104 104
 
105
-		$valueA = (int)in_array($a, $al, true);
106
-		$valueB = (int)in_array($b, $al, true);
105
+		$valueA = (int) in_array($a, $al, true);
106
+		$valueB = (int) in_array($b, $al, true);
107 107
 
108 108
 		return $valueB - $valueA;
109 109
 	}
Please login to merge, or discard this patch.
apps/comments/lib/Collaboration/CommentersSorter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
 	 */
50 50
 	public function sort(array &$sortArray, array $context) {
51 51
 		$commenters = $this->retrieveCommentsInformation($context['itemType'], $context['itemId']);
52
-		if(count($commenters) === 0) {
52
+		if (count($commenters) === 0) {
53 53
 			return;
54 54
 		}
55 55
 
56 56
 		foreach ($sortArray as $type => &$byType) {
57
-			if(!isset($commenters[$type])) {
57
+			if (!isset($commenters[$type])) {
58 58
 				continue;
59 59
 			}
60 60
 
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
 				return [$i++, $element];
66 66
 			}, $byType);
67 67
 
68
-			usort($workArray, function ($a, $b) use ($commenters, $type) {
68
+			usort($workArray, function($a, $b) use ($commenters, $type) {
69 69
 				$r = $this->compare($a[1], $b[1], $commenters[$type]);
70
-				if($r === 0) {
70
+				if ($r === 0) {
71 71
 					$r = $a[0] - $b[0];
72 72
 				}
73 73
 				return $r;
@@ -85,16 +85,16 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	protected function retrieveCommentsInformation($type, $id) {
87 87
 		$comments = $this->commentsManager->getForObject($type, $id);
88
-		if(count($comments) === 0) {
88
+		if (count($comments) === 0) {
89 89
 			return [];
90 90
 		}
91 91
 
92 92
 		$actors = [];
93 93
 		foreach ($comments as $comment) {
94
-			if(!isset($actors[$comment->getActorType()])) {
94
+			if (!isset($actors[$comment->getActorType()])) {
95 95
 				$actors[$comment->getActorType()] = [];
96 96
 			}
97
-			if(!isset($actors[$comment->getActorType()][$comment->getActorId()])) {
97
+			if (!isset($actors[$comment->getActorType()][$comment->getActorId()])) {
98 98
 				$actors[$comment->getActorType()][$comment->getActorId()] = 1;
99 99
 			} else {
100 100
 				$actors[$comment->getActorType()][$comment->getActorId()]++;
Please login to merge, or discard this patch.
lib/private/DB/OracleMigrator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 				$column->changedProperties = array_diff($column->changedProperties, ['autoincrement', 'unsigned']);
155 155
 			}
156 156
 			// remove columns that no longer have changed (because autoincrement and unsigned are not supported)
157
-			$tableDiff->changedColumns = array_filter($tableDiff->changedColumns, function (ColumnDiff $column) {
157
+			$tableDiff->changedColumns = array_filter($tableDiff->changedColumns, function(ColumnDiff $column) {
158 158
 				return count($column->changedProperties) > 0;
159 159
 			});
160 160
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	 * @return string
204 204
 	 */
205 205
 	protected function generateTemporaryTableName($name) {
206
-		return 'oc_' . uniqid();
206
+		return 'oc_'.uniqid();
207 207
 	}
208 208
 
209 209
 	/**
@@ -212,16 +212,16 @@  discard block
 block discarded – undo
212 212
 	 */
213 213
 	protected function convertStatementToScript($statement) {
214 214
 		if (substr($statement, -1) === ';') {
215
-			return $statement . PHP_EOL . '/' . PHP_EOL;
215
+			return $statement.PHP_EOL.'/'.PHP_EOL;
216 216
 		}
217
-		$script = $statement . ';';
217
+		$script = $statement.';';
218 218
 		$script .= PHP_EOL;
219 219
 		$script .= PHP_EOL;
220 220
 		return $script;
221 221
 	}
222 222
 
223 223
 	protected function getFilterExpression() {
224
-		return '/^"' . preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')) . '/';
224
+		return '/^"'.preg_quote($this->config->getSystemValue('dbtableprefix', 'oc_')).'/';
225 225
 	}
226 226
 
227 227
 }
Please login to merge, or discard this patch.
lib/private/Repair/RepairMimeTypes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	private function updateMimetypes($updatedMimetypes) {
90 90
 		if (empty($this->folderMimeTypeId)) {
91 91
 			$result = \OC_DB::executeAudited(self::getIdStmt(), array('httpd/unix-directory'));
92
-			$this->folderMimeTypeId = (int)$result->fetchOne();
92
+			$this->folderMimeTypeId = (int) $result->fetchOne();
93 93
 		}
94 94
 
95 95
 		$count = 0;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 			$mimetypeId = $result->fetchOne();
108 108
 
109 109
 			// change mimetype for files with x extension
110
-			$count += \OC_DB::executeAudited(self::updateByNameStmt(), array($mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.' . $extension));
110
+			$count += \OC_DB::executeAudited(self::updateByNameStmt(), array($mimetypeId, $this->folderMimeTypeId, $mimetypeId, '%.'.$extension));
111 111
 		}
112 112
 
113 113
 		return $count;
Please login to merge, or discard this patch.
apps/user_ldap/lib/UserPluginManager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
 		$respondToActions = $plugin->respondToActions();
59 59
 		$this->respondToActions |= $respondToActions;
60 60
 
61
-		foreach($this->which as $action => $v) {
62
-			if (is_int($action) && (bool)($respondToActions & $action)) {
61
+		foreach ($this->which as $action => $v) {
62
+			if (is_int($action) && (bool) ($respondToActions & $action)) {
63 63
 				$this->which[$action] = $plugin;
64 64
 				\OC::$server->getLogger()->debug("Registered action ".$action." to plugin ".get_class($plugin), ['app' => 'user_ldap']);
65 65
 			}
66 66
 		}
67
-		if (method_exists($plugin,'deleteUser')) {
67
+		if (method_exists($plugin, 'deleteUser')) {
68 68
 			$this->which['deleteUser'] = $plugin;
69 69
 			\OC::$server->getLogger()->debug("Registered action deleteUser to plugin ".get_class($plugin), ['app' => 'user_ldap']);
70 70
 		}
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		$plugin = $this->which[Backend::CREATE_USER];
92 92
 
93 93
 		if ($plugin) {
94
-			return $plugin->createUser($username,$password);
94
+			return $plugin->createUser($username, $password);
95 95
 		}
96 96
 		throw new \Exception('No plugin implements createUser in this LDAP Backend.');
97 97
 	}
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		$plugin = $this->which[Backend::SET_PASSWORD];
108 108
 
109 109
 		if ($plugin) {
110
-			return $plugin->setPassword($uid,$password);
110
+			return $plugin->setPassword($uid, $password);
111 111
 		}
112 112
 		throw new \Exception('No plugin implements setPassword in this LDAP Backend.');
113 113
 	}
Please login to merge, or discard this patch.
apps/user_ldap/lib/GroupPluginManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 		$respondToActions = $plugin->respondToActions();
54 54
 		$this->respondToActions |= $respondToActions;
55 55
 
56
-		foreach($this->which as $action => $v) {
57
-			if ((bool)($respondToActions & $action)) {
56
+		foreach ($this->which as $action => $v) {
57
+			if ((bool) ($respondToActions & $action)) {
58 58
 				$this->which[$action] = $plugin;
59 59
 				\OC::$server->getLogger()->debug("Registered action ".$action." to plugin ".get_class($plugin), ['app' => 'user_ldap']);
60 60
 			}
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 		$plugin = $this->which[GroupInterface::COUNT_USERS];
148 148
 
149 149
 		if ($plugin) {
150
-			return $plugin->countUsersInGroup($gid,$search);
150
+			return $plugin->countUsersInGroup($gid, $search);
151 151
 		}
152 152
 		throw new \Exception('No plugin implements countUsersInGroup in this LDAP Backend.');
153 153
 	}
Please login to merge, or discard this patch.