Passed
Push — master ( f0dd71...c56a27 )
by Christoph
11:49 queued 12s
created
apps/dav/lib/Upload/ChunkingPlugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
 
101 101
 		// casted to string because cast to float cause equality for non equal numbers
102 102
 		// and integer has the problem of limited size on 32 bit systems
103
-		if ((string)$expectedSize !== (string)$actualSize) {
103
+		if ((string) $expectedSize !== (string) $actualSize) {
104 104
 			throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize bytes");
105 105
 		}
106 106
 	}
Please login to merge, or discard this patch.
lib/private/Template/JSCombiner.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		$this->appData = $appData;
70 70
 		$this->urlGenerator = $urlGenerator;
71 71
 		$this->cacheFactory = $cacheFactory;
72
-		$this->depsCache = $this->cacheFactory->createDistributed('JS-' . md5($this->urlGenerator->getBaseUrl()));
72
+		$this->depsCache = $this->cacheFactory->createDistributed('JS-'.md5($this->urlGenerator->getBaseUrl()));
73 73
 		$this->config = $config;
74 74
 		$this->logger = $logger;
75 75
 	}
@@ -85,19 +85,19 @@  discard block
 block discarded – undo
85 85
 			return false;
86 86
 		}
87 87
 
88
-		$path = explode('/', $root . '/' . $file);
88
+		$path = explode('/', $root.'/'.$file);
89 89
 
90 90
 		$fileName = array_pop($path);
91 91
 		$path = implode('/', $path);
92 92
 
93 93
 		try {
94 94
 			$folder = $this->appData->getFolder($app);
95
-		} catch(NotFoundException $e) {
95
+		} catch (NotFoundException $e) {
96 96
 			// creating css appdata folder
97 97
 			$folder = $this->appData->newFolder($app);
98 98
 		}
99 99
 
100
-		if($this->isCached($fileName, $folder)) {
100
+		if ($this->isCached($fileName, $folder)) {
101 101
 			return true;
102 102
 		}
103 103
 		return $this->cache($path, $fileName, $folder);
@@ -115,9 +115,9 @@  discard block
 block discarded – undo
115 115
 			return false;
116 116
 		}
117 117
 
118
-		$fileName = $fileName . '.deps';
118
+		$fileName = $fileName.'.deps';
119 119
 		try {
120
-			$deps = $this->depsCache->get($folder->getName() . '-' . $fileName);
120
+			$deps = $this->depsCache->get($folder->getName().'-'.$fileName);
121 121
 			if ($deps === null || $deps === '') {
122 122
 				$depFile = $folder->getFile($fileName);
123 123
 				$deps = $depFile->getContent();
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 			// check again
127 127
 			if ($deps === null || $deps === '') {
128
-				$this->logger->info('JSCombiner: deps file empty: ' . $fileName);
128
+				$this->logger->info('JSCombiner: deps file empty: '.$fileName);
129 129
 				return false;
130 130
 			}
131 131
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 			}
143 143
 
144 144
 			return true;
145
-		} catch(NotFoundException $e) {
145
+		} catch (NotFoundException $e) {
146 146
 			return false;
147 147
 		}
148 148
 	}
@@ -155,17 +155,17 @@  discard block
 block discarded – undo
155 155
 	 */
156 156
 	protected function cache($path, $fileName, ISimpleFolder $folder) {
157 157
 		$deps = [];
158
-		$fullPath = $path . '/' . $fileName;
158
+		$fullPath = $path.'/'.$fileName;
159 159
 		$data = json_decode(file_get_contents($fullPath));
160 160
 		$deps[$fullPath] = filemtime($fullPath);
161 161
 
162 162
 		$res = '';
163 163
 		foreach ($data as $file) {
164
-			$filePath = $path . '/' . $file;
164
+			$filePath = $path.'/'.$file;
165 165
 
166 166
 			if (is_file($filePath)) {
167 167
 				$res .= file_get_contents($filePath);
168
-				$res .= PHP_EOL . PHP_EOL;
168
+				$res .= PHP_EOL.PHP_EOL;
169 169
 				$deps[$filePath] = filemtime($filePath);
170 170
 			}
171 171
 		}
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
 		$fileName = str_replace('.json', '.js', $fileName);
174 174
 		try {
175 175
 			$cachedfile = $folder->getFile($fileName);
176
-		} catch(NotFoundException $e) {
176
+		} catch (NotFoundException $e) {
177 177
 			$cachedfile = $folder->newFile($fileName);
178 178
 		}
179 179
 
180
-		$depFileName = $fileName . '.deps';
180
+		$depFileName = $fileName.'.deps';
181 181
 		try {
182 182
 			$depFile = $folder->getFile($depFileName);
183 183
 		} catch (NotFoundException $e) {
@@ -185,21 +185,21 @@  discard block
 block discarded – undo
185 185
 		}
186 186
 
187 187
 		try {
188
-			$gzipFile = $folder->getFile($fileName . '.gzip'); # Safari doesn't like .gz
188
+			$gzipFile = $folder->getFile($fileName.'.gzip'); # Safari doesn't like .gz
189 189
 		} catch (NotFoundException $e) {
190
-			$gzipFile = $folder->newFile($fileName . '.gzip'); # Safari doesn't like .gz
190
+			$gzipFile = $folder->newFile($fileName.'.gzip'); # Safari doesn't like .gz
191 191
 		}
192 192
 
193 193
 		try {
194 194
 			$cachedfile->putContent($res);
195 195
 			$deps = json_encode($deps);
196 196
 			$depFile->putContent($deps);
197
-			$this->depsCache->set($folder->getName() . '-' . $depFileName, $deps);
197
+			$this->depsCache->set($folder->getName().'-'.$depFileName, $deps);
198 198
 			$gzipFile->putContent(gzencode($res, 9));
199
-			$this->logger->debug('JSCombiner: successfully cached: ' . $fileName);
199
+			$this->logger->debug('JSCombiner: successfully cached: '.$fileName);
200 200
 			return true;
201 201
 		} catch (NotPermittedException $e) {
202
-			$this->logger->error('JSCombiner: unable to cache: ' . $fileName);
202
+			$this->logger->error('JSCombiner: unable to cache: '.$fileName);
203 203
 			return false;
204 204
 		}
205 205
 	}
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
 	 */
225 225
 	public function getContent($root, $file) {
226 226
 		/** @var array $data */
227
-		$data = json_decode(file_get_contents($root . '/' . $file));
228
-		if(!is_array($data)) {
227
+		$data = json_decode(file_get_contents($root.'/'.$file));
228
+		if (!is_array($data)) {
229 229
 			return [];
230 230
 		}
231 231
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
 		$result = [];
237 237
 		foreach ($data as $f) {
238
-			$result[] = $path . '/' . $f;
238
+			$result[] = $path.'/'.$f;
239 239
 		}
240 240
 
241 241
 		return $result;
Please login to merge, or discard this patch.
lib/private/Files/Storage/Flysystem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	}
57 57
 
58 58
 	protected function buildPath($path) {
59
-		$fullPath = \OC\Files\Filesystem::normalizePath($this->root . '/' . $path);
59
+		$fullPath = \OC\Files\Filesystem::normalizePath($this->root.'/'.$path);
60 60
 		return ltrim($fullPath, '/');
61 61
 	}
62 62
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		} catch (FileNotFoundException $e) {
164 164
 			return false;
165 165
 		}
166
-		$names = array_map(function ($object) {
166
+		$names = array_map(function($object) {
167 167
 			return $object['basename'];
168 168
 		}, $content);
169 169
 		return IteratorDirectory::wrap($names);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 					$tmpFile = \OC::$server->getTempManager()->getTemporaryFile();
210 210
 				}
211 211
 				$source = fopen($tmpFile, $mode);
212
-				return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath) {
212
+				return CallbackWrapper::wrap($source, null, null, function() use ($tmpFile, $fullPath) {
213 213
 					$this->flysystem->putStream($fullPath, fopen($tmpFile, 'r'));
214 214
 					unlink($tmpFile);
215 215
 				});
Please login to merge, or discard this patch.
apps/dav/lib/HookManager.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 			'post_createUser',
78 78
 			$this,
79 79
 			'postCreateUser');
80
-		\OC::$server->getUserManager()->listen('\OC\User', 'assignedUserId', function ($uid) {
80
+		\OC::$server->getUserManager()->listen('\OC\User', 'assignedUserId', function($uid) {
81 81
 			$this->postCreateUser(['uid' => $uid]);
82 82
 		});
83 83
 		Util::connectHook('OC_User',
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 			'post_deleteUser',
90 90
 			$this,
91 91
 			'postDeleteUser');
92
-		\OC::$server->getUserManager()->listen('\OC\User', 'postUnassignedUserId', function ($uid) {
92
+		\OC::$server->getUserManager()->listen('\OC\User', 'postUnassignedUserId', function($uid) {
93 93
 			$this->postDeleteUser(['uid' => $uid]);
94 94
 		});
95 95
 		\OC::$server->getUserManager()->listen('\OC\User', 'postUnassignedUserId', [$this, 'postUnassignedUserId']);
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
 	public function preDeleteUser($params) {
108 108
 		$uid = $params['uid'];
109 109
 		$this->usersToDelete[$uid] = $this->userManager->get($uid);
110
-		$this->calendarsToDelete = $this->calDav->getUsersOwnCalendars('principals/users/' . $uid);
111
-		$this->addressBooksToDelete = $this->cardDav->getUsersOwnAddressBooks('principals/users/' . $uid);
110
+		$this->calendarsToDelete = $this->calDav->getUsersOwnCalendars('principals/users/'.$uid);
111
+		$this->addressBooksToDelete = $this->cardDav->getUsersOwnAddressBooks('principals/users/'.$uid);
112 112
 	}
113 113
 
114 114
 	public function preUnassignedUserId($uid) {
@@ -117,14 +117,14 @@  discard block
 block discarded – undo
117 117
 
118 118
 	public function postDeleteUser($params) {
119 119
 		$uid = $params['uid'];
120
-		if (isset($this->usersToDelete[$uid])){
120
+		if (isset($this->usersToDelete[$uid])) {
121 121
 			$this->syncService->deleteUser($this->usersToDelete[$uid]);
122 122
 		}
123 123
 
124 124
 		foreach ($this->calendarsToDelete as $calendar) {
125 125
 			$this->calDav->deleteCalendar($calendar['id']);
126 126
 		}
127
-		$this->calDav->deleteAllSharesByUser('principals/users/' . $uid);
127
+		$this->calDav->deleteAllSharesByUser('principals/users/'.$uid);
128 128
 
129 129
 		foreach ($this->addressBooksToDelete as $addressBook) {
130 130
 			$this->cardDav->deleteAddressBook($addressBook['id']);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	}
133 133
 
134 134
 	public function postUnassignedUserId($uid) {
135
-		if (isset($this->usersToDelete[$uid])){
135
+		if (isset($this->usersToDelete[$uid])) {
136 136
 			$this->syncService->deleteUser($this->usersToDelete[$uid]);
137 137
 		}
138 138
 	}
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
 	public function firstLogin(IUser $user = null) {
146 146
 		if (!is_null($user)) {
147
-			$principal = 'principals/users/' . $user->getUID();
147
+			$principal = 'principals/users/'.$user->getUID();
148 148
 			if ($this->calDav->getCalendarsForUserCount($principal) === 0) {
149 149
 				try {
150 150
 					$this->calDav->createCalendar($principal, CalDavBackend::PERSONAL_CALENDAR_URI, [
Please login to merge, or discard this patch.
apps/user_ldap/ajax/deleteConfiguration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
 \OC_JSON::checkAppEnabled('user_ldap');
32 32
 \OC_JSON::callCheck();
33 33
 
34
-$prefix = (string)$_POST['ldap_serverconfig_chooser'];
34
+$prefix = (string) $_POST['ldap_serverconfig_chooser'];
35 35
 $helper = new \OCA\User_LDAP\Helper(\OC::$server->getConfig());
36
-if($helper->deleteServerConfiguration($prefix)) {
36
+if ($helper->deleteServerConfiguration($prefix)) {
37 37
 	\OC_JSON::success();
38 38
 } else {
39 39
 	$l = \OC::$server->getL10N('user_ldap');
Please login to merge, or discard this patch.
apps/user_ldap/ajax/getConfiguration.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 \OC_JSON::checkAppEnabled('user_ldap');
30 30
 \OC_JSON::callCheck();
31 31
 
32
-$prefix = (string)$_POST['ldap_serverconfig_chooser'];
32
+$prefix = (string) $_POST['ldap_serverconfig_chooser'];
33 33
 $ldapWrapper = new OCA\User_LDAP\LDAP();
34 34
 $connection = new \OCA\User_LDAP\Connection($ldapWrapper, $prefix);
35 35
 $configuration = $connection->getConfiguration();
Please login to merge, or discard this patch.
apps/provisioning_api/composer/composer/autoload_static.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -6,35 +6,35 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInitProvisioning_API
8 8
 {
9
-    public static $prefixLengthsPsr4 = array (
9
+    public static $prefixLengthsPsr4 = array(
10 10
         'O' => 
11
-        array (
11
+        array(
12 12
             'OCA\\Provisioning_API\\' => 21,
13 13
         ),
14 14
     );
15 15
 
16
-    public static $prefixDirsPsr4 = array (
16
+    public static $prefixDirsPsr4 = array(
17 17
         'OCA\\Provisioning_API\\' => 
18
-        array (
19
-            0 => __DIR__ . '/..' . '/../lib',
18
+        array(
19
+            0 => __DIR__.'/..'.'/../lib',
20 20
         ),
21 21
     );
22 22
 
23
-    public static $classMap = array (
24
-        'OCA\\Provisioning_API\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
25
-        'OCA\\Provisioning_API\\Controller\\AUserData' => __DIR__ . '/..' . '/../lib/Controller/AUserData.php',
26
-        'OCA\\Provisioning_API\\Controller\\AppConfigController' => __DIR__ . '/..' . '/../lib/Controller/AppConfigController.php',
27
-        'OCA\\Provisioning_API\\Controller\\AppsController' => __DIR__ . '/..' . '/../lib/Controller/AppsController.php',
28
-        'OCA\\Provisioning_API\\Controller\\GroupsController' => __DIR__ . '/..' . '/../lib/Controller/GroupsController.php',
29
-        'OCA\\Provisioning_API\\Controller\\UsersController' => __DIR__ . '/..' . '/../lib/Controller/UsersController.php',
30
-        'OCA\\Provisioning_API\\FederatedFileSharingFactory' => __DIR__ . '/..' . '/../lib/FederatedFileSharingFactory.php',
31
-        'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => __DIR__ . '/..' . '/../lib/Middleware/Exceptions/NotSubAdminException.php',
32
-        'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => __DIR__ . '/..' . '/../lib/Middleware/ProvisioningApiMiddleware.php',
23
+    public static $classMap = array(
24
+        'OCA\\Provisioning_API\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php',
25
+        'OCA\\Provisioning_API\\Controller\\AUserData' => __DIR__.'/..'.'/../lib/Controller/AUserData.php',
26
+        'OCA\\Provisioning_API\\Controller\\AppConfigController' => __DIR__.'/..'.'/../lib/Controller/AppConfigController.php',
27
+        'OCA\\Provisioning_API\\Controller\\AppsController' => __DIR__.'/..'.'/../lib/Controller/AppsController.php',
28
+        'OCA\\Provisioning_API\\Controller\\GroupsController' => __DIR__.'/..'.'/../lib/Controller/GroupsController.php',
29
+        'OCA\\Provisioning_API\\Controller\\UsersController' => __DIR__.'/..'.'/../lib/Controller/UsersController.php',
30
+        'OCA\\Provisioning_API\\FederatedFileSharingFactory' => __DIR__.'/..'.'/../lib/FederatedFileSharingFactory.php',
31
+        'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => __DIR__.'/..'.'/../lib/Middleware/Exceptions/NotSubAdminException.php',
32
+        'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => __DIR__.'/..'.'/../lib/Middleware/ProvisioningApiMiddleware.php',
33 33
     );
34 34
 
35 35
     public static function getInitializer(ClassLoader $loader)
36 36
     {
37
-        return \Closure::bind(function () use ($loader) {
37
+        return \Closure::bind(function() use ($loader) {
38 38
             $loader->prefixLengthsPsr4 = ComposerStaticInitProvisioning_API::$prefixLengthsPsr4;
39 39
             $loader->prefixDirsPsr4 = ComposerStaticInitProvisioning_API::$prefixDirsPsr4;
40 40
             $loader->classMap = ComposerStaticInitProvisioning_API::$classMap;
Please login to merge, or discard this patch.
apps/provisioning_api/composer/composer/autoload_classmap.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@
 block discarded – undo
6 6
 $baseDir = $vendorDir;
7 7
 
8 8
 return array(
9
-    'OCA\\Provisioning_API\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
10
-    'OCA\\Provisioning_API\\Controller\\AUserData' => $baseDir . '/../lib/Controller/AUserData.php',
11
-    'OCA\\Provisioning_API\\Controller\\AppConfigController' => $baseDir . '/../lib/Controller/AppConfigController.php',
12
-    'OCA\\Provisioning_API\\Controller\\AppsController' => $baseDir . '/../lib/Controller/AppsController.php',
13
-    'OCA\\Provisioning_API\\Controller\\GroupsController' => $baseDir . '/../lib/Controller/GroupsController.php',
14
-    'OCA\\Provisioning_API\\Controller\\UsersController' => $baseDir . '/../lib/Controller/UsersController.php',
15
-    'OCA\\Provisioning_API\\FederatedFileSharingFactory' => $baseDir . '/../lib/FederatedFileSharingFactory.php',
16
-    'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => $baseDir . '/../lib/Middleware/Exceptions/NotSubAdminException.php',
17
-    'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => $baseDir . '/../lib/Middleware/ProvisioningApiMiddleware.php',
9
+    'OCA\\Provisioning_API\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php',
10
+    'OCA\\Provisioning_API\\Controller\\AUserData' => $baseDir.'/../lib/Controller/AUserData.php',
11
+    'OCA\\Provisioning_API\\Controller\\AppConfigController' => $baseDir.'/../lib/Controller/AppConfigController.php',
12
+    'OCA\\Provisioning_API\\Controller\\AppsController' => $baseDir.'/../lib/Controller/AppsController.php',
13
+    'OCA\\Provisioning_API\\Controller\\GroupsController' => $baseDir.'/../lib/Controller/GroupsController.php',
14
+    'OCA\\Provisioning_API\\Controller\\UsersController' => $baseDir.'/../lib/Controller/UsersController.php',
15
+    'OCA\\Provisioning_API\\FederatedFileSharingFactory' => $baseDir.'/../lib/FederatedFileSharingFactory.php',
16
+    'OCA\\Provisioning_API\\Middleware\\Exceptions\\NotSubAdminException' => $baseDir.'/../lib/Middleware/Exceptions/NotSubAdminException.php',
17
+    'OCA\\Provisioning_API\\Middleware\\ProvisioningApiMiddleware' => $baseDir.'/../lib/Middleware/ProvisioningApiMiddleware.php',
18 18
 );
Please login to merge, or discard this patch.
apps/user_ldap/ajax/clearMappings.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,25 +31,25 @@
 block discarded – undo
31 31
 \OC_JSON::checkAppEnabled('user_ldap');
32 32
 \OC_JSON::callCheck();
33 33
 
34
-$subject = (string)$_POST['ldap_clear_mapping'];
34
+$subject = (string) $_POST['ldap_clear_mapping'];
35 35
 $mapping = null;
36 36
 try {
37
-	if($subject === 'user') {
37
+	if ($subject === 'user') {
38 38
 		$mapping = new UserMapping(\OC::$server->getDatabaseConnection());
39 39
 		$result = $mapping->clearCb(
40
-			function ($uid) {
40
+			function($uid) {
41 41
 				\OC::$server->getUserManager()->emit('\OC\User', 'preUnassignedUserId', [$uid]);
42 42
 			},
43
-			function ($uid) {
43
+			function($uid) {
44 44
 				\OC::$server->getUserManager()->emit('\OC\User', 'postUnassignedUserId', [$uid]);
45 45
 			}
46 46
 		);
47
-	} else if($subject === 'group') {
47
+	} else if ($subject === 'group') {
48 48
 		$mapping = new GroupMapping(\OC::$server->getDatabaseConnection());
49 49
 		$result = $mapping->clear();
50 50
 	}
51 51
 
52
-	if($mapping === null || !$result) {
52
+	if ($mapping === null || !$result) {
53 53
 		$l = \OC::$server->getL10N('user_ldap');
54 54
 		throw new \Exception($l->t('Failed to clear the mappings.'));
55 55
 	}
Please login to merge, or discard this patch.