Passed
Push — master ( 8d52a3...b5b8a1 )
by Morris
11:55 queued 10s
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.
apps/user_ldap/lib/Helper.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$keys = $this->getServersConfig($referenceConfigkey);
100 100
 
101 101
 		$result = array();
102
-		foreach($keys as $key) {
102
+		foreach ($keys as $key) {
103 103
 			$len = strlen($key) - strlen($referenceConfigkey);
104 104
 			$prefix = substr($key, 0, $len);
105 105
 			$result[$prefix] = $this->config->getAppValue('user_ldap', $key);
@@ -116,18 +116,18 @@  discard block
 block discarded – undo
116 116
 	public function getNextServerConfigurationPrefix() {
117 117
 		$serverConnections = $this->getServerConfigurationPrefixes();
118 118
 
119
-		if(count($serverConnections) === 0) {
119
+		if (count($serverConnections) === 0) {
120 120
 			return 's01';
121 121
 		}
122 122
 
123 123
 		sort($serverConnections);
124 124
 		$lastKey = array_pop($serverConnections);
125
-		$lastNumber = (int)str_replace('s', '', $lastKey);
126
-		return 's' . str_pad($lastNumber + 1, 2, '0', STR_PAD_LEFT);
125
+		$lastNumber = (int) str_replace('s', '', $lastKey);
126
+		return 's'.str_pad($lastNumber + 1, 2, '0', STR_PAD_LEFT);
127 127
 	}
128 128
 
129 129
 	private function getServersConfig($value) {
130
-		$regex = '/' . $value . '$/S';
130
+		$regex = '/'.$value.'$/S';
131 131
 
132 132
 		$keys = $this->config->getAppKeys('user_ldap');
133 133
 		$result = [];
@@ -146,12 +146,12 @@  discard block
 block discarded – undo
146 146
 	 * @return bool true on success, false otherwise
147 147
 	 */
148 148
 	public function deleteServerConfiguration($prefix) {
149
-		if(!in_array($prefix, self::getServerConfigurationPrefixes())) {
149
+		if (!in_array($prefix, self::getServerConfigurationPrefixes())) {
150 150
 			return false;
151 151
 		}
152 152
 
153 153
 		$saveOtherConfigurations = '';
154
-		if(empty($prefix)) {
154
+		if (empty($prefix)) {
155 155
 			$saveOtherConfigurations = 'AND `configkey` NOT LIKE \'s%\'';
156 156
 		}
157 157
 
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
 		');
166 166
 		$delRows = $query->execute(array($prefix.'%'));
167 167
 
168
-		if($delRows === null) {
168
+		if ($delRows === null) {
169 169
 			return false;
170 170
 		}
171 171
 
172
-		if($delRows === 0) {
172
+		if ($delRows === 0) {
173 173
 			return false;
174 174
 		}
175 175
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		$all = $this->getServerConfigurationPrefixes(false);
186 186
 		$active = $this->getServerConfigurationPrefixes(true);
187 187
 
188
-		if(!is_array($all) || !is_array($active)) {
188
+		if (!is_array($all) || !is_array($active)) {
189 189
 			throw new \Exception('Unexpected Return Value');
190 190
 		}
191 191
 
@@ -199,14 +199,14 @@  discard block
 block discarded – undo
199 199
 	 */
200 200
 	public function getDomainFromURL($url) {
201 201
 		$uinfo = parse_url($url);
202
-		if(!is_array($uinfo)) {
202
+		if (!is_array($uinfo)) {
203 203
 			return false;
204 204
 		}
205 205
 
206 206
 		$domain = false;
207
-		if(isset($uinfo['host'])) {
207
+		if (isset($uinfo['host'])) {
208 208
 			$domain = $uinfo['host'];
209
-		} else if(isset($uinfo['path'])) {
209
+		} else if (isset($uinfo['path'])) {
210 210
 			$domain = $uinfo['path'];
211 211
 		}
212 212
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 	 */
221 221
 	public function setLDAPProvider() {
222 222
 		$current = \OC::$server->getConfig()->getSystemValue('ldapProviderFactory', null);
223
-		if(is_null($current)) {
223
+		if (is_null($current)) {
224 224
 			\OC::$server->getConfig()->setSystemValue('ldapProviderFactory', LDAPProviderFactory::class);
225 225
 		}
226 226
 	}
@@ -232,9 +232,9 @@  discard block
 block discarded – undo
232 232
 	 */
233 233
 	public function sanitizeDN($dn) {
234 234
 		//treating multiple base DNs
235
-		if(is_array($dn)) {
235
+		if (is_array($dn)) {
236 236
 			$result = array();
237
-			foreach($dn as $singleDN) {
237
+			foreach ($dn as $singleDN) {
238 238
 				$result[] = $this->sanitizeDN($singleDN);
239 239
 			}
240 240
 			return $result;
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 	 * @throws \Exception
286 286
 	 */
287 287
 	public static function loginName2UserName($param) {
288
-		if(!isset($param['uid'])) {
288
+		if (!isset($param['uid'])) {
289 289
 			throw new \Exception('key uid is expected to be set in $param');
290 290
 		}
291 291
 
@@ -300,11 +300,11 @@  discard block
 block discarded – undo
300 300
 		$userSession = \OC::$server->getUserSession();
301 301
 		$userPluginManager = \OC::$server->query('LDAPUserPluginManager');
302 302
 
303
-		$userBackend  = new User_Proxy(
303
+		$userBackend = new User_Proxy(
304 304
 			$configPrefixes, $ldapWrapper, $ocConfig, $notificationManager, $userSession, $userPluginManager
305 305
 		);
306
-		$uid = $userBackend->loginName2UserName($param['uid'] );
307
-		if($uid !== false) {
306
+		$uid = $userBackend->loginName2UserName($param['uid']);
307
+		if ($uid !== false) {
308 308
 			$param['uid'] = $uid;
309 309
 		}
310 310
 	}
Please login to merge, or discard this patch.
lib/private/legacy/eventsource.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		header('X-Accel-Buffering: no');
61 61
 		$this->fallback = isset($_GET['fallback']) and $_GET['fallback'] == 'true';
62 62
 		if ($this->fallback) {
63
-			$this->fallBackId = (int)$_GET['fallback_id'];
63
+			$this->fallBackId = (int) $_GET['fallback_id'];
64 64
 			/**
65 65
 			 * FIXME: The default content-security-policy of ownCloud forbids inline
66 66
 			 * JavaScript for security reasons. IE starting on Windows 10 will
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
 			 */
74 74
 			header("Content-Security-Policy: default-src 'none'; script-src 'unsafe-inline'");
75 75
 			header("Content-Type: text/html");
76
-			echo str_repeat('<span></span>' . PHP_EOL, 10); //dummy data to keep IE happy
76
+			echo str_repeat('<span></span>'.PHP_EOL, 10); //dummy data to keep IE happy
77 77
 		} else {
78 78
 			header("Content-Type: text/event-stream");
79 79
 		}
80
-		if(!\OC::$server->getRequest()->passesStrictCookieCheck()) {
80
+		if (!\OC::$server->getRequest()->passesStrictCookieCheck()) {
81 81
 			header('Location: '.\OC::$WEBROOT);
82 82
 			exit();
83 83
 		}
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	public function send($type, $data = null) {
103 103
 		if ($data and !preg_match('/^[A-Za-z0-9_]+$/', $type)) {
104
-			throw new BadMethodCallException('Type needs to be alphanumeric ('. $type .')');
104
+			throw new BadMethodCallException('Type needs to be alphanumeric ('.$type.')');
105 105
 		}
106 106
 		$this->init();
107 107
 		if (is_null($data)) {
@@ -110,13 +110,13 @@  discard block
 block discarded – undo
110 110
 		}
111 111
 		if ($this->fallback) {
112 112
 			$response = '<script type="text/javascript">window.parent.OC.EventSource.fallBackCallBack('
113
-				. $this->fallBackId . ',"' . $type . '",' . OC_JSON::encode($data) . ')</script>' . PHP_EOL;
113
+				. $this->fallBackId.',"'.$type.'",'.OC_JSON::encode($data).')</script>'.PHP_EOL;
114 114
 			echo $response;
115 115
 		} else {
116 116
 			if ($type) {
117
-				echo 'event: ' . $type . PHP_EOL;
117
+				echo 'event: '.$type.PHP_EOL;
118 118
 			}
119
-			echo 'data: ' . OC_JSON::encode($data) . PHP_EOL;
119
+			echo 'data: '.OC_JSON::encode($data).PHP_EOL;
120 120
 		}
121 121
 		echo PHP_EOL;
122 122
 		flush();
Please login to merge, or discard this patch.
apps/files/composer/composer/autoload_classmap.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -6,32 +6,32 @@
 block discarded – undo
6 6
 $baseDir = $vendorDir;
7 7
 
8 8
 return array(
9
-    'OCA\\Files\\Activity\\FavoriteProvider' => $baseDir . '/../lib/Activity/FavoriteProvider.php',
10
-    'OCA\\Files\\Activity\\Filter\\Favorites' => $baseDir . '/../lib/Activity/Filter/Favorites.php',
11
-    'OCA\\Files\\Activity\\Filter\\FileChanges' => $baseDir . '/../lib/Activity/Filter/FileChanges.php',
12
-    'OCA\\Files\\Activity\\Helper' => $baseDir . '/../lib/Activity/Helper.php',
13
-    'OCA\\Files\\Activity\\Provider' => $baseDir . '/../lib/Activity/Provider.php',
14
-    'OCA\\Files\\Activity\\Settings\\FavoriteAction' => $baseDir . '/../lib/Activity/Settings/FavoriteAction.php',
15
-    'OCA\\Files\\Activity\\Settings\\FileChanged' => $baseDir . '/../lib/Activity/Settings/FileChanged.php',
16
-    'OCA\\Files\\Activity\\Settings\\FileCreated' => $baseDir . '/../lib/Activity/Settings/FileCreated.php',
17
-    'OCA\\Files\\Activity\\Settings\\FileDeleted' => $baseDir . '/../lib/Activity/Settings/FileDeleted.php',
18
-    'OCA\\Files\\Activity\\Settings\\FileFavorite' => $baseDir . '/../lib/Activity/Settings/FileFavorite.php',
19
-    'OCA\\Files\\Activity\\Settings\\FileRestored' => $baseDir . '/../lib/Activity/Settings/FileRestored.php',
20
-    'OCA\\Files\\App' => $baseDir . '/../lib/App.php',
21
-    'OCA\\Files\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
22
-    'OCA\\Files\\BackgroundJob\\CleanupFileLocks' => $baseDir . '/../lib/BackgroundJob/CleanupFileLocks.php',
23
-    'OCA\\Files\\BackgroundJob\\DeleteOrphanedItems' => $baseDir . '/../lib/BackgroundJob/DeleteOrphanedItems.php',
24
-    'OCA\\Files\\BackgroundJob\\ScanFiles' => $baseDir . '/../lib/BackgroundJob/ScanFiles.php',
25
-    'OCA\\Files\\Capabilities' => $baseDir . '/../lib/Capabilities.php',
26
-    'OCA\\Files\\Command\\DeleteOrphanedFiles' => $baseDir . '/../lib/Command/DeleteOrphanedFiles.php',
27
-    'OCA\\Files\\Command\\Scan' => $baseDir . '/../lib/Command/Scan.php',
28
-    'OCA\\Files\\Command\\ScanAppData' => $baseDir . '/../lib/Command/ScanAppData.php',
29
-    'OCA\\Files\\Command\\TransferOwnership' => $baseDir . '/../lib/Command/TransferOwnership.php',
30
-    'OCA\\Files\\Controller\\AjaxController' => $baseDir . '/../lib/Controller/AjaxController.php',
31
-    'OCA\\Files\\Controller\\ApiController' => $baseDir . '/../lib/Controller/ApiController.php',
32
-    'OCA\\Files\\Controller\\SettingsController' => $baseDir . '/../lib/Controller/SettingsController.php',
33
-    'OCA\\Files\\Controller\\ViewController' => $baseDir . '/../lib/Controller/ViewController.php',
34
-    'OCA\\Files\\Helper' => $baseDir . '/../lib/Helper.php',
35
-    'OCA\\Files\\Service\\TagService' => $baseDir . '/../lib/Service/TagService.php',
36
-    'OCA\\Files\\Settings\\Admin' => $baseDir . '/../lib/Settings/Admin.php',
9
+    'OCA\\Files\\Activity\\FavoriteProvider' => $baseDir.'/../lib/Activity/FavoriteProvider.php',
10
+    'OCA\\Files\\Activity\\Filter\\Favorites' => $baseDir.'/../lib/Activity/Filter/Favorites.php',
11
+    'OCA\\Files\\Activity\\Filter\\FileChanges' => $baseDir.'/../lib/Activity/Filter/FileChanges.php',
12
+    'OCA\\Files\\Activity\\Helper' => $baseDir.'/../lib/Activity/Helper.php',
13
+    'OCA\\Files\\Activity\\Provider' => $baseDir.'/../lib/Activity/Provider.php',
14
+    'OCA\\Files\\Activity\\Settings\\FavoriteAction' => $baseDir.'/../lib/Activity/Settings/FavoriteAction.php',
15
+    'OCA\\Files\\Activity\\Settings\\FileChanged' => $baseDir.'/../lib/Activity/Settings/FileChanged.php',
16
+    'OCA\\Files\\Activity\\Settings\\FileCreated' => $baseDir.'/../lib/Activity/Settings/FileCreated.php',
17
+    'OCA\\Files\\Activity\\Settings\\FileDeleted' => $baseDir.'/../lib/Activity/Settings/FileDeleted.php',
18
+    'OCA\\Files\\Activity\\Settings\\FileFavorite' => $baseDir.'/../lib/Activity/Settings/FileFavorite.php',
19
+    'OCA\\Files\\Activity\\Settings\\FileRestored' => $baseDir.'/../lib/Activity/Settings/FileRestored.php',
20
+    'OCA\\Files\\App' => $baseDir.'/../lib/App.php',
21
+    'OCA\\Files\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php',
22
+    'OCA\\Files\\BackgroundJob\\CleanupFileLocks' => $baseDir.'/../lib/BackgroundJob/CleanupFileLocks.php',
23
+    'OCA\\Files\\BackgroundJob\\DeleteOrphanedItems' => $baseDir.'/../lib/BackgroundJob/DeleteOrphanedItems.php',
24
+    'OCA\\Files\\BackgroundJob\\ScanFiles' => $baseDir.'/../lib/BackgroundJob/ScanFiles.php',
25
+    'OCA\\Files\\Capabilities' => $baseDir.'/../lib/Capabilities.php',
26
+    'OCA\\Files\\Command\\DeleteOrphanedFiles' => $baseDir.'/../lib/Command/DeleteOrphanedFiles.php',
27
+    'OCA\\Files\\Command\\Scan' => $baseDir.'/../lib/Command/Scan.php',
28
+    'OCA\\Files\\Command\\ScanAppData' => $baseDir.'/../lib/Command/ScanAppData.php',
29
+    'OCA\\Files\\Command\\TransferOwnership' => $baseDir.'/../lib/Command/TransferOwnership.php',
30
+    'OCA\\Files\\Controller\\AjaxController' => $baseDir.'/../lib/Controller/AjaxController.php',
31
+    'OCA\\Files\\Controller\\ApiController' => $baseDir.'/../lib/Controller/ApiController.php',
32
+    'OCA\\Files\\Controller\\SettingsController' => $baseDir.'/../lib/Controller/SettingsController.php',
33
+    'OCA\\Files\\Controller\\ViewController' => $baseDir.'/../lib/Controller/ViewController.php',
34
+    'OCA\\Files\\Helper' => $baseDir.'/../lib/Helper.php',
35
+    'OCA\\Files\\Service\\TagService' => $baseDir.'/../lib/Service/TagService.php',
36
+    'OCA\\Files\\Settings\\Admin' => $baseDir.'/../lib/Settings/Admin.php',
37 37
 );
Please login to merge, or discard this patch.
apps/files/composer/composer/autoload_static.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -6,54 +6,54 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInitFiles
8 8
 {
9
-    public static $prefixLengthsPsr4 = array (
9
+    public static $prefixLengthsPsr4 = array(
10 10
         'O' => 
11
-        array (
11
+        array(
12 12
             'OCA\\Files\\' => 10,
13 13
         ),
14 14
     );
15 15
 
16
-    public static $prefixDirsPsr4 = array (
16
+    public static $prefixDirsPsr4 = array(
17 17
         'OCA\\Files\\' => 
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\\Files\\Activity\\FavoriteProvider' => __DIR__ . '/..' . '/../lib/Activity/FavoriteProvider.php',
25
-        'OCA\\Files\\Activity\\Filter\\Favorites' => __DIR__ . '/..' . '/../lib/Activity/Filter/Favorites.php',
26
-        'OCA\\Files\\Activity\\Filter\\FileChanges' => __DIR__ . '/..' . '/../lib/Activity/Filter/FileChanges.php',
27
-        'OCA\\Files\\Activity\\Helper' => __DIR__ . '/..' . '/../lib/Activity/Helper.php',
28
-        'OCA\\Files\\Activity\\Provider' => __DIR__ . '/..' . '/../lib/Activity/Provider.php',
29
-        'OCA\\Files\\Activity\\Settings\\FavoriteAction' => __DIR__ . '/..' . '/../lib/Activity/Settings/FavoriteAction.php',
30
-        'OCA\\Files\\Activity\\Settings\\FileChanged' => __DIR__ . '/..' . '/../lib/Activity/Settings/FileChanged.php',
31
-        'OCA\\Files\\Activity\\Settings\\FileCreated' => __DIR__ . '/..' . '/../lib/Activity/Settings/FileCreated.php',
32
-        'OCA\\Files\\Activity\\Settings\\FileDeleted' => __DIR__ . '/..' . '/../lib/Activity/Settings/FileDeleted.php',
33
-        'OCA\\Files\\Activity\\Settings\\FileFavorite' => __DIR__ . '/..' . '/../lib/Activity/Settings/FileFavorite.php',
34
-        'OCA\\Files\\Activity\\Settings\\FileRestored' => __DIR__ . '/..' . '/../lib/Activity/Settings/FileRestored.php',
35
-        'OCA\\Files\\App' => __DIR__ . '/..' . '/../lib/App.php',
36
-        'OCA\\Files\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
37
-        'OCA\\Files\\BackgroundJob\\CleanupFileLocks' => __DIR__ . '/..' . '/../lib/BackgroundJob/CleanupFileLocks.php',
38
-        'OCA\\Files\\BackgroundJob\\DeleteOrphanedItems' => __DIR__ . '/..' . '/../lib/BackgroundJob/DeleteOrphanedItems.php',
39
-        'OCA\\Files\\BackgroundJob\\ScanFiles' => __DIR__ . '/..' . '/../lib/BackgroundJob/ScanFiles.php',
40
-        'OCA\\Files\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php',
41
-        'OCA\\Files\\Command\\DeleteOrphanedFiles' => __DIR__ . '/..' . '/../lib/Command/DeleteOrphanedFiles.php',
42
-        'OCA\\Files\\Command\\Scan' => __DIR__ . '/..' . '/../lib/Command/Scan.php',
43
-        'OCA\\Files\\Command\\ScanAppData' => __DIR__ . '/..' . '/../lib/Command/ScanAppData.php',
44
-        'OCA\\Files\\Command\\TransferOwnership' => __DIR__ . '/..' . '/../lib/Command/TransferOwnership.php',
45
-        'OCA\\Files\\Controller\\AjaxController' => __DIR__ . '/..' . '/../lib/Controller/AjaxController.php',
46
-        'OCA\\Files\\Controller\\ApiController' => __DIR__ . '/..' . '/../lib/Controller/ApiController.php',
47
-        'OCA\\Files\\Controller\\SettingsController' => __DIR__ . '/..' . '/../lib/Controller/SettingsController.php',
48
-        'OCA\\Files\\Controller\\ViewController' => __DIR__ . '/..' . '/../lib/Controller/ViewController.php',
49
-        'OCA\\Files\\Helper' => __DIR__ . '/..' . '/../lib/Helper.php',
50
-        'OCA\\Files\\Service\\TagService' => __DIR__ . '/..' . '/../lib/Service/TagService.php',
51
-        'OCA\\Files\\Settings\\Admin' => __DIR__ . '/..' . '/../lib/Settings/Admin.php',
23
+    public static $classMap = array(
24
+        'OCA\\Files\\Activity\\FavoriteProvider' => __DIR__.'/..'.'/../lib/Activity/FavoriteProvider.php',
25
+        'OCA\\Files\\Activity\\Filter\\Favorites' => __DIR__.'/..'.'/../lib/Activity/Filter/Favorites.php',
26
+        'OCA\\Files\\Activity\\Filter\\FileChanges' => __DIR__.'/..'.'/../lib/Activity/Filter/FileChanges.php',
27
+        'OCA\\Files\\Activity\\Helper' => __DIR__.'/..'.'/../lib/Activity/Helper.php',
28
+        'OCA\\Files\\Activity\\Provider' => __DIR__.'/..'.'/../lib/Activity/Provider.php',
29
+        'OCA\\Files\\Activity\\Settings\\FavoriteAction' => __DIR__.'/..'.'/../lib/Activity/Settings/FavoriteAction.php',
30
+        'OCA\\Files\\Activity\\Settings\\FileChanged' => __DIR__.'/..'.'/../lib/Activity/Settings/FileChanged.php',
31
+        'OCA\\Files\\Activity\\Settings\\FileCreated' => __DIR__.'/..'.'/../lib/Activity/Settings/FileCreated.php',
32
+        'OCA\\Files\\Activity\\Settings\\FileDeleted' => __DIR__.'/..'.'/../lib/Activity/Settings/FileDeleted.php',
33
+        'OCA\\Files\\Activity\\Settings\\FileFavorite' => __DIR__.'/..'.'/../lib/Activity/Settings/FileFavorite.php',
34
+        'OCA\\Files\\Activity\\Settings\\FileRestored' => __DIR__.'/..'.'/../lib/Activity/Settings/FileRestored.php',
35
+        'OCA\\Files\\App' => __DIR__.'/..'.'/../lib/App.php',
36
+        'OCA\\Files\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php',
37
+        'OCA\\Files\\BackgroundJob\\CleanupFileLocks' => __DIR__.'/..'.'/../lib/BackgroundJob/CleanupFileLocks.php',
38
+        'OCA\\Files\\BackgroundJob\\DeleteOrphanedItems' => __DIR__.'/..'.'/../lib/BackgroundJob/DeleteOrphanedItems.php',
39
+        'OCA\\Files\\BackgroundJob\\ScanFiles' => __DIR__.'/..'.'/../lib/BackgroundJob/ScanFiles.php',
40
+        'OCA\\Files\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php',
41
+        'OCA\\Files\\Command\\DeleteOrphanedFiles' => __DIR__.'/..'.'/../lib/Command/DeleteOrphanedFiles.php',
42
+        'OCA\\Files\\Command\\Scan' => __DIR__.'/..'.'/../lib/Command/Scan.php',
43
+        'OCA\\Files\\Command\\ScanAppData' => __DIR__.'/..'.'/../lib/Command/ScanAppData.php',
44
+        'OCA\\Files\\Command\\TransferOwnership' => __DIR__.'/..'.'/../lib/Command/TransferOwnership.php',
45
+        'OCA\\Files\\Controller\\AjaxController' => __DIR__.'/..'.'/../lib/Controller/AjaxController.php',
46
+        'OCA\\Files\\Controller\\ApiController' => __DIR__.'/..'.'/../lib/Controller/ApiController.php',
47
+        'OCA\\Files\\Controller\\SettingsController' => __DIR__.'/..'.'/../lib/Controller/SettingsController.php',
48
+        'OCA\\Files\\Controller\\ViewController' => __DIR__.'/..'.'/../lib/Controller/ViewController.php',
49
+        'OCA\\Files\\Helper' => __DIR__.'/..'.'/../lib/Helper.php',
50
+        'OCA\\Files\\Service\\TagService' => __DIR__.'/..'.'/../lib/Service/TagService.php',
51
+        'OCA\\Files\\Settings\\Admin' => __DIR__.'/..'.'/../lib/Settings/Admin.php',
52 52
     );
53 53
 
54 54
     public static function getInitializer(ClassLoader $loader)
55 55
     {
56
-        return \Closure::bind(function () use ($loader) {
56
+        return \Closure::bind(function() use ($loader) {
57 57
             $loader->prefixLengthsPsr4 = ComposerStaticInitFiles::$prefixLengthsPsr4;
58 58
             $loader->prefixDirsPsr4 = ComposerStaticInitFiles::$prefixDirsPsr4;
59 59
             $loader->classMap = ComposerStaticInitFiles::$classMap;
Please login to merge, or discard this patch.
apps/files/ajax/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 $l = \OC::$server->getL10N('files');
33 33
 
34 34
 // Load the files
35
-$dir = isset($_GET['dir']) ? (string)$_GET['dir'] : '';
35
+$dir = isset($_GET['dir']) ? (string) $_GET['dir'] : '';
36 36
 $dir = \OC\Files\Filesystem::normalizePath($dir);
37 37
 
38 38
 try {
@@ -43,11 +43,11 @@  discard block
 block discarded – undo
43 43
 	}
44 44
 
45 45
 	$data = array();
46
-	$baseUrl = \OC::$server->getURLGenerator()->linkTo('files', 'index.php') . '?dir=';
46
+	$baseUrl = \OC::$server->getURLGenerator()->linkTo('files', 'index.php').'?dir=';
47 47
 
48 48
 	$permissions = $dirInfo->getPermissions();
49 49
 
50
-	$sortAttribute = isset($_GET['sort']) ? (string)$_GET['sort'] : 'name';
50
+	$sortAttribute = isset($_GET['sort']) ? (string) $_GET['sort'] : 'name';
51 51
 	$sortDirection = isset($_GET['sortdirection']) ? ($_GET['sortdirection'] === 'desc') : false;
52 52
 	$mimetypeFilters = isset($_GET['mimetypes']) ? json_decode($_GET['mimetypes']) : '';
53 53
 
Please login to merge, or discard this patch.
core/templates/login.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 <form method="post" name="login">
9 9
 	<fieldset>
10 10
 	<?php if (!empty($_['redirect_url'])) {
11
-		print_unescaped('<input type="hidden" name="redirect_url" value="' . \OCP\Util::sanitizeHTML($_['redirect_url']) . '">');
11
+		print_unescaped('<input type="hidden" name="redirect_url" value="'.\OCP\Util::sanitizeHTML($_['redirect_url']).'">');
12 12
 	} ?>
13 13
 		<?php if (isset($_['apacheauthfailed']) && $_['apacheauthfailed']): ?>
14 14
 			<div class="warning">
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 				<small><?php p($l->t('Please contact your administrator.')); ?></small>
17 17
 			</div>
18 18
 		<?php endif; ?>
19
-		<?php foreach($_['messages'] as $message): ?>
19
+		<?php foreach ($_['messages'] as $message): ?>
20 20
 			<div class="warning">
21 21
 				<?php p($message); ?><br>
22 22
 			</div>
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 		<?php endif; ?>
30 30
 		<div id="message" class="hidden">
31 31
 			<img class="float-spinner" alt=""
32
-				src="<?php p(image_path('core', 'loading-dark.gif'));?>">
32
+				src="<?php p(image_path('core', 'loading-dark.gif')); ?>">
33 33
 			<span id="messageText"></span>
34 34
 			<!-- the following div ensures that the spinner is always inside the #message div -->
35 35
 			<div style="clear: both;"></div>
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 <form id="alternative-logins">
108 108
 	<fieldset>
109 109
 		<ul>
110
-			<?php foreach($_['alt_login'] as $login): ?>
110
+			<?php foreach ($_['alt_login'] as $login): ?>
111 111
 				<li><a class="button" href="<?php print_unescaped($login['href']); ?>" ><?php p($login['name']); ?></a></li>
112 112
 			<?php endforeach; ?>
113 113
 		</ul>
Please login to merge, or discard this patch.
apps/user_ldap/lib/Mapping/AbstractMapping.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 * @return bool
54 54
 	 */
55 55
 	public function isColNameValid($col) {
56
-		switch($col) {
56
+		switch ($col) {
57 57
 			case 'ldap_dn':
58 58
 			case 'owncloud_name':
59 59
 			case 'directory_uuid':
@@ -72,19 +72,19 @@  discard block
 block discarded – undo
72 72
 	 * @return string|false
73 73
 	 */
74 74
 	protected function getXbyY($fetchCol, $compareCol, $search) {
75
-		if(!$this->isColNameValid($fetchCol)) {
75
+		if (!$this->isColNameValid($fetchCol)) {
76 76
 			//this is used internally only, but we don't want to risk
77 77
 			//having SQL injection at all.
78 78
 			throw new \Exception('Invalid Column Name');
79 79
 		}
80 80
 		$query = $this->dbc->prepare('
81
-			SELECT `' . $fetchCol . '`
82
-			FROM `'. $this->getTableName() .'`
83
-			WHERE `' . $compareCol . '` = ?
81
+			SELECT `' . $fetchCol.'`
82
+			FROM `'. $this->getTableName().'`
83
+			WHERE `' . $compareCol.'` = ?
84 84
 		');
85 85
 
86 86
 		$res = $query->execute(array($search));
87
-		if($res !== false) {
87
+		if ($res !== false) {
88 88
 			return $query->fetchColumn();
89 89
 		}
90 90
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	 */
121 121
 	public function setDNbyUUID($fdn, $uuid) {
122 122
 		$query = $this->dbc->prepare('
123
-			UPDATE `' . $this->getTableName() . '`
123
+			UPDATE `' . $this->getTableName().'`
124 124
 			SET `ldap_dn` = ?
125 125
 			WHERE `directory_uuid` = ?
126 126
 		');
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	 */
140 140
 	public function setUUIDbyDN($uuid, $fdn) {
141 141
 		$query = $this->dbc->prepare('
142
-			UPDATE `' . $this->getTableName() . '`
142
+			UPDATE `' . $this->getTableName().'`
143 143
 			SET `directory_uuid` = ?
144 144
 			WHERE `ldap_dn` = ?
145 145
 		');
@@ -166,14 +166,14 @@  discard block
 block discarded – undo
166 166
 	public function getNamesBySearch($search, $prefixMatch = "", $postfixMatch = "") {
167 167
 		$query = $this->dbc->prepare('
168 168
 			SELECT `owncloud_name`
169
-			FROM `'. $this->getTableName() .'`
169
+			FROM `'. $this->getTableName().'`
170 170
 			WHERE `owncloud_name` LIKE ?
171 171
 		');
172 172
 
173 173
 		$res = $query->execute(array($prefixMatch.$this->dbc->escapeLikeParameter($search).$postfixMatch));
174 174
 		$names = array();
175
-		if($res !== false) {
176
-			while($row = $query->fetch()) {
175
+		if ($res !== false) {
176
+			while ($row = $query->fetch()) {
177 177
 				$names[] = $row['owncloud_name'];
178 178
 			}
179 179
 		}
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 				`ldap_dn` AS `dn`,
212 212
 				`owncloud_name` AS `name`,
213 213
 				`directory_uuid` AS `uuid`
214
-			FROM `' . $this->getTableName() . '`',
214
+			FROM `' . $this->getTableName().'`',
215 215
 			$limit,
216 216
 			$offset
217 217
 		);
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 	 * @return bool
229 229
 	 */
230 230
 	public function map($fdn, $name, $uuid) {
231
-		if(mb_strlen($fdn) > 255) {
231
+		if (mb_strlen($fdn) > 255) {
232 232
 			\OC::$server->getLogger()->error(
233 233
 				'Cannot map, because the DN exceeds 255 characters: {dn}',
234 234
 				[
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 		try {
249 249
 			$result = $this->dbc->insertIfNotExist($this->getTableName(), $row);
250 250
 			// insertIfNotExist returns values as int
251
-			return (bool)$result;
251
+			return (bool) $result;
252 252
 		} catch (\Exception $e) {
253 253
 			return false;
254 254
 		}
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 	 */
262 262
 	public function unmap($name) {
263 263
 		$query = $this->dbc->prepare('
264
-			DELETE FROM `'. $this->getTableName() .'`
264
+			DELETE FROM `'. $this->getTableName().'`
265 265
 			WHERE `owncloud_name` = ?');
266 266
 
267 267
 		return $this->modify($query, array($name));
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 	public function clear() {
275 275
 		$sql = $this->dbc
276 276
 			->getDatabasePlatform()
277
-			->getTruncateTableSQL('`' . $this->getTableName() . '`');
277
+			->getTruncateTableSQL('`'.$this->getTableName().'`');
278 278
 		return $this->dbc->prepare($sql)->execute();
279 279
 	}
280 280
 
@@ -293,9 +293,9 @@  discard block
 block discarded – undo
293 293
 			->from($this->getTableName());
294 294
 		$cursor = $picker->execute();
295 295
 		$result = true;
296
-		while($id = $cursor->fetchColumn(0)) {
296
+		while ($id = $cursor->fetchColumn(0)) {
297 297
 			$preCallback($id);
298
-			if($isUnmapped = $this->unmap($id)) {
298
+			if ($isUnmapped = $this->unmap($id)) {
299 299
 				$postCallback($id);
300 300
 			}
301 301
 			$result &= $isUnmapped;
@@ -316,6 +316,6 @@  discard block
 block discarded – undo
316 316
 		$res = $query->execute();
317 317
 		$count = $res->fetchColumn();
318 318
 		$res->closeCursor();
319
-		return (int)$count;
319
+		return (int) $count;
320 320
 	}
321 321
 }
Please login to merge, or discard this patch.