Completed
Push — master ( 54b1f4...fdc61e )
by Christoph
34:11 queued 21:41
created
apps/user_ldap/lib/LDAPProvider.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		$this->deletedUsersIndex = $deletedUsersIndex;
55 55
 		$userBackendFound = false;
56 56
 		$groupBackendFound = false;
57
-		foreach ($serverContainer->getUserManager()->getBackends() as $backend){
57
+		foreach ($serverContainer->getUserManager()->getBackends() as $backend) {
58 58
 			$this->logger->debug('instance '.get_class($backend).' user backend.', ['app' => 'user_ldap']);
59 59
 			if ($backend instanceof IUserLDAP) {
60 60
 				$this->userBackend = $backend;
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 				break;
63 63
 			}
64 64
         }
65
-		foreach ($serverContainer->getGroupManager()->getBackends() as $backend){
65
+		foreach ($serverContainer->getGroupManager()->getBackends() as $backend) {
66 66
 			$this->logger->debug('instance '.get_class($backend).' group backend.', ['app' => 'user_ldap']);
67 67
 			if ($backend instanceof IGroupLDAP) {
68 68
 				$this->groupBackend = $backend;
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
 	 * @throws \Exception if translation was unsuccessful
84 84
 	 */
85 85
 	public function getUserDN($uid) {
86
-		if(!$this->userBackend->userExists($uid)){
86
+		if (!$this->userBackend->userExists($uid)) {
87 87
 			throw new \Exception('User id not found in LDAP');
88 88
 		}
89 89
 		$result = $this->userBackend->getLDAPAccess($uid)->username2dn($uid);
90
-		if(!$result){
90
+		if (!$result) {
91 91
 			throw new \Exception('Translation to LDAP DN unsuccessful');
92 92
 		}
93 93
 		return $result;
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
 	 * @throws \Exception
101 101
 	 */
102 102
 	public function getGroupDN($gid) {
103
-		if(!$this->groupBackend->groupExists($gid)){
103
+		if (!$this->groupBackend->groupExists($gid)) {
104 104
 			throw new \Exception('Group id not found in LDAP');
105 105
 		}
106 106
 		$result = $this->groupBackend->getLDAPAccess($gid)->groupname2dn($gid);
107
-		if(!$result){
107
+		if (!$result) {
108 108
 			throw new \Exception('Translation to LDAP DN unsuccessful');
109 109
 		}
110 110
 		return $result;	
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 */
120 120
 	public function getUserName($dn) {
121 121
 		$result = $this->userBackend->dn2UserName($dn);
122
-		if(!$result){
122
+		if (!$result) {
123 123
 			throw new \Exception('Translation to internal user name unsuccessful');
124 124
 		}
125 125
 		return $result;
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	 * @throws \Exception if user id was not found in LDAP
152 152
 	 */
153 153
 	public function getLDAPConnection($uid) {
154
-		if(!$this->userBackend->userExists($uid)){
154
+		if (!$this->userBackend->userExists($uid)) {
155 155
 			throw new \Exception('User id not found in LDAP');
156 156
 		}
157 157
 		return $this->userBackend->getNewLDAPConnection($uid);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 * @throws \Exception if group id was not found in LDAP
166 166
 	 */
167 167
 	public function getGroupLDAPConnection($gid) {
168
-		if(!$this->groupBackend->groupExists($gid)){
168
+		if (!$this->groupBackend->groupExists($gid)) {
169 169
 			throw new \Exception('Group id not found in LDAP');
170 170
 		}
171 171
 		return $this->groupBackend->getNewLDAPConnection($gid);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 	 * @throws \Exception if user id was not found in LDAP
179 179
 	 */
180 180
 	public function getLDAPBaseUsers($uid) {
181
-		if(!$this->userBackend->userExists($uid)){
181
+		if (!$this->userBackend->userExists($uid)) {
182 182
 			throw new \Exception('User id not found in LDAP');
183 183
 		}	
184 184
 		return $this->userBackend->getLDAPAccess($uid)->getConnection()->getConfiguration()['ldap_base_users'];
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	 * @throws \Exception if user id was not found in LDAP
192 192
 	 */
193 193
 	public function getLDAPBaseGroups($uid) {
194
-		if(!$this->userBackend->userExists($uid)){
194
+		if (!$this->userBackend->userExists($uid)) {
195 195
 			throw new \Exception('User id not found in LDAP');
196 196
 		}
197 197
 		return $this->userBackend->getLDAPAccess($uid)->getConnection()->getConfiguration()['ldap_base_groups'];
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 	 * @throws \Exception if user id was not found in LDAP
204 204
 	 */
205 205
 	public function clearCache($uid) {
206
-		if(!$this->userBackend->userExists($uid)){
206
+		if (!$this->userBackend->userExists($uid)) {
207 207
 			throw new \Exception('User id not found in LDAP');
208 208
 		}
209 209
 		$this->userBackend->getLDAPAccess($uid)->getConnection()->clearCache();
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 * @throws \Exception if user id was not found in LDAP
217 217
 	 */
218 218
 	public function clearGroupCache($gid) {
219
-		if(!$this->groupBackend->groupExists($gid)){
219
+		if (!$this->groupBackend->groupExists($gid)) {
220 220
 			throw new \Exception('Group id not found in LDAP');
221 221
 		}
222 222
 		$this->groupBackend->getLDAPAccess($gid)->getConnection()->clearCache();
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	 * @throws \Exception if user id was not found in LDAP
256 256
 	 */
257 257
 	public function getLDAPDisplayNameField($uid) {
258
-		if(!$this->userBackend->userExists($uid)){
258
+		if (!$this->userBackend->userExists($uid)) {
259 259
 			throw new \Exception('User id not found in LDAP');
260 260
 		}
261 261
 		return $this->userBackend->getLDAPAccess($uid)->getConnection()->getConfiguration()['ldap_display_name'];
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 	 * @throws \Exception if user id was not found in LDAP
269 269
 	 */
270 270
 	public function getLDAPEmailField($uid) {
271
-		if(!$this->userBackend->userExists($uid)){
271
+		if (!$this->userBackend->userExists($uid)) {
272 272
 			throw new \Exception('User id not found in LDAP');
273 273
 		}
274 274
 		return $this->userBackend->getLDAPAccess($uid)->getConnection()->getConfiguration()['ldap_email_attr'];
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 	 * @throws \Exception if group id was not found in LDAP
282 282
 	 */
283 283
 	public function getLDAPGroupMemberAssoc($gid) {
284
-		if(!$this->groupBackend->groupExists($gid)){
284
+		if (!$this->groupBackend->groupExists($gid)) {
285 285
 			throw new \Exception('Group id not found in LDAP');
286 286
 		}
287 287
 		return $this->groupBackend->getLDAPAccess($gid)->getConnection()->getConfiguration()['ldap_group_member_assoc_attribute'];
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.
apps/dav/lib/DAV/SystemPrincipalBackend.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
 	 * @return array
164 164
 	 */
165 165
 	function getGroupMembership($principal) {
166
-		list($prefix, ) = \Sabre\Uri\split($principal);
166
+		list($prefix,) = \Sabre\Uri\split($principal);
167 167
 
168 168
 		if ($prefix === 'principals/system') {
169 169
 			$principal = $this->getPrincipalByPath($principal);
Please login to merge, or discard this patch.
lib/private/Calendar/Manager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 	/**
31 31
 	 * @var ICalendar[] holds all registered calendars
32 32
 	 */
33
-	private $calendars=[];
33
+	private $calendars = [];
34 34
 
35 35
 	/**
36 36
 	 * @var \Closure[] to call to load/register calendar providers
37 37
 	 */
38
-	private $calendarLoaders=[];
38
+	private $calendarLoaders = [];
39 39
 
40 40
 	/**
41 41
 	 * This function is used to search and find objects within the user's calendars.
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 	 * @return array an array of events/journals/todos which are arrays of arrays of key-value-pairs
51 51
 	 * @since 13.0.0
52 52
 	 */
53
-	public function search($pattern, array $searchProperties=[], array $options=[], $limit=null, $offset=null) {
53
+	public function search($pattern, array $searchProperties = [], array $options = [], $limit = null, $offset = null) {
54 54
 		$this->loadCalendars();
55 55
 		$result = [];
56
-		foreach($this->calendars as $calendar) {
56
+		foreach ($this->calendars as $calendar) {
57 57
 			$r = $calendar->search($pattern, $searchProperties, $options, $limit, $offset);
58
-			foreach($r as $o) {
58
+			foreach ($r as $o) {
59 59
 				$o['calendar-key'] = $calendar->getKey();
60 60
 				$result[] = $o;
61 61
 			}
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 * loads all calendars
133 133
 	 */
134 134
 	private function loadCalendars() {
135
-		foreach($this->calendarLoaders as $callable) {
135
+		foreach ($this->calendarLoaders as $callable) {
136 136
 			$callable($this);
137 137
 		}
138 138
 		$this->calendarLoaders = [];
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/CalendarImpl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * @return array an array of events/journals/todos which are arrays of key-value-pairs
88 88
 	 * @since 13.0.0
89 89
 	 */
90
-	public function search($pattern, array $searchProperties=[], array $options=[], $limit=null, $offset=null) {
90
+	public function search($pattern, array $searchProperties = [], array $options = [], $limit = null, $offset = null) {
91 91
 		return $this->backend->search($this->calendarInfo, $pattern,
92 92
 			$searchProperties, $options, $limit, $offset);
93 93
 	}
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$permissions = $this->calendar->getACL();
101 101
 		$result = 0;
102 102
 		foreach ($permissions as $permission) {
103
-			switch($permission['privilege']) {
103
+			switch ($permission['privilege']) {
104 104
 				case '{DAV:}read':
105 105
 					$result |= Constants::PERMISSION_READ;
106 106
 					break;
Please login to merge, or discard this patch.
lib/private/Files/Storage/Wrapper/Jail.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,12 +56,12 @@
 block discarded – undo
56 56
 		if ($path === '') {
57 57
 			return $this->rootPath;
58 58
 		} else {
59
-			return $this->rootPath . '/' . $path;
59
+			return $this->rootPath.'/'.$path;
60 60
 		}
61 61
 	}
62 62
 
63 63
 	public function getJailedPath($path) {
64
-		$root = rtrim($this->rootPath, '/') . '/';
64
+		$root = rtrim($this->rootPath, '/').'/';
65 65
 
66 66
 		if (strpos($path, $root) !== 0) {
67 67
 			return null;
Please login to merge, or discard this patch.
apps/dav/lib/Controller/BirthdayCalendarController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 								IDBConnection $db, IConfig $config,
78 78
 								IJobList $jobList,
79 79
 								IUserManager $userManager,
80
-								CalDavBackend $calDavBackend){
80
+								CalDavBackend $calDavBackend) {
81 81
 		parent::__construct($appName, $request);
82 82
 		$this->db = $db;
83 83
 		$this->config = $config;
Please login to merge, or discard this patch.
apps/user_ldap/templates/part.wizardcontrols.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,17 +1,17 @@
 block discarded – undo
1 1
 <div class="ldapWizardControls">
2
-	<span class="ldap_saving hidden"><?php p($l->t('Saving'));?> <img class="wizSpinner" src="<?php p(image_path('core', 'loading.gif')); ?>"/></span>
2
+	<span class="ldap_saving hidden"><?php p($l->t('Saving')); ?> <img class="wizSpinner" src="<?php p(image_path('core', 'loading.gif')); ?>"/></span>
3 3
 	<span class="ldap_config_state_indicator"></span> <span class="ldap_config_state_indicator_sign"></span>
4 4
 	<button class="ldap_action_back invisible" name="ldap_action_back"
5 5
 			type="button">
6
-		<?php p($l->t('Back'));?>
6
+		<?php p($l->t('Back')); ?>
7 7
 	</button>
8 8
 	<button class="ldap_action_continue primary" name="ldap_action_continue" type="button">
9
-		<?php p($l->t('Continue'));?>
9
+		<?php p($l->t('Continue')); ?>
10 10
 	</button>
11 11
 	<a href="<?php p(link_to_docs('admin-ldap')); ?>"
12 12
 		target="_blank" rel="noreferrer noopener">
13 13
 		<img src="<?php print_unescaped(image_path('', 'actions/info.svg')); ?>"
14 14
 			style="height:1.75ex" />
15
-		<span class="ldap_grey"><?php p($l->t('Help'));?></span>
15
+		<span class="ldap_grey"><?php p($l->t('Help')); ?></span>
16 16
 	</a>
17 17
 </div>
Please login to merge, or discard this patch.