Passed
Push — master ( 93133b...c32f14 )
by Morris
18:46 queued 07:48
created
lib/private/Diagnostics/EventLogger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	 * @inheritdoc
43 43
 	 */
44 44
 	public function start($id, $description) {
45
-		if ($this->activated){
45
+		if ($this->activated) {
46 46
 			$this->events[$id] = new Event($id, $description, microtime(true));
47 47
 		}
48 48
 	}
Please login to merge, or discard this patch.
lib/private/Files/Utils/Scanner.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -118,17 +118,17 @@  discard block
 block discarded – undo
118 118
 	protected function attachListener($mount) {
119 119
 		$scanner = $mount->getStorage()->getScanner();
120 120
 		$emitter = $this;
121
-		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFile', function ($path) use ($mount, $emitter) {
122
-			$emitter->emit('\OC\Files\Utils\Scanner', 'scanFile', array($mount->getMountPoint() . $path));
121
+		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFile', function($path) use ($mount, $emitter) {
122
+			$emitter->emit('\OC\Files\Utils\Scanner', 'scanFile', array($mount->getMountPoint().$path));
123 123
 		});
124
-		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFolder', function ($path) use ($mount, $emitter) {
125
-			$emitter->emit('\OC\Files\Utils\Scanner', 'scanFolder', array($mount->getMountPoint() . $path));
124
+		$scanner->listen('\OC\Files\Cache\Scanner', 'scanFolder', function($path) use ($mount, $emitter) {
125
+			$emitter->emit('\OC\Files\Utils\Scanner', 'scanFolder', array($mount->getMountPoint().$path));
126 126
 		});
127
-		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFile', function ($path) use ($mount, $emitter) {
128
-			$emitter->emit('\OC\Files\Utils\Scanner', 'postScanFile', array($mount->getMountPoint() . $path));
127
+		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFile', function($path) use ($mount, $emitter) {
128
+			$emitter->emit('\OC\Files\Utils\Scanner', 'postScanFile', array($mount->getMountPoint().$path));
129 129
 		});
130
-		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFolder', function ($path) use ($mount, $emitter) {
131
-			$emitter->emit('\OC\Files\Utils\Scanner', 'postScanFolder', array($mount->getMountPoint() . $path));
130
+		$scanner->listen('\OC\Files\Cache\Scanner', 'postScanFolder', function($path) use ($mount, $emitter) {
131
+			$emitter->emit('\OC\Files\Utils\Scanner', 'postScanFolder', array($mount->getMountPoint().$path));
132 132
 		});
133 133
 	}
134 134
 
@@ -160,13 +160,13 @@  discard block
 block discarded – undo
160 160
 			$scanner = $storage->getScanner();
161 161
 			$this->attachListener($mount);
162 162
 
163
-			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function ($path) use ($storage) {
163
+			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function($path) use ($storage) {
164 164
 				$this->triggerPropagator($storage, $path);
165 165
 			});
166
-			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function ($path) use ($storage) {
166
+			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function($path) use ($storage) {
167 167
 				$this->triggerPropagator($storage, $path);
168 168
 			});
169
-			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function ($path) use ($storage) {
169
+			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function($path) use ($storage) {
170 170
 				$this->triggerPropagator($storage, $path);
171 171
 			});
172 172
 
@@ -219,13 +219,13 @@  discard block
 block discarded – undo
219 219
 			$scanner->setUseTransactions(false);
220 220
 			$this->attachListener($mount);
221 221
 
222
-			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function ($path) use ($storage) {
222
+			$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function($path) use ($storage) {
223 223
 				$this->postProcessEntry($storage, $path);
224 224
 			});
225
-			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function ($path) use ($storage) {
225
+			$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function($path) use ($storage) {
226 226
 				$this->postProcessEntry($storage, $path);
227 227
 			});
228
-			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function ($path) use ($storage) {
228
+			$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function($path) use ($storage) {
229 229
 				$this->postProcessEntry($storage, $path);
230 230
 			});
231 231
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 				}
248 248
 				$propagator->commitBatch();
249 249
 			} catch (StorageNotAvailableException $e) {
250
-				$this->logger->error('Storage ' . $storage->getId() . ' not available');
250
+				$this->logger->error('Storage '.$storage->getId().' not available');
251 251
 				$this->logger->logException($e);
252 252
 				$this->emit('\OC\Files\Utils\Scanner', 'StorageNotAvailable', [$e]);
253 253
 			}
Please login to merge, or discard this patch.
lib/private/App/AppStore/Bundles/SocialSharingBundle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 	 * {@inheritDoc}
28 28
 	 */
29 29
 	public function getName() {
30
-		return (string)$this->l10n->t('Social sharing bundle');
30
+		return (string) $this->l10n->t('Social sharing bundle');
31 31
 	}
32 32
 
33 33
 	/**
Please login to merge, or discard this patch.
lib/private/App/AppStore/Fetcher/Fetcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
 				if (isset($jsonBlob['ncversion']) && $jsonBlob['ncversion'] === $this->getVersion()) {
133 133
 
134 134
 					// If the timestamp is older than 300 seconds request the files new
135
-					if ((int)$jsonBlob['timestamp'] > ($this->timeFactory->getTime() - self::INVALIDATE_AFTER_SECONDS)) {
135
+					if ((int) $jsonBlob['timestamp'] > ($this->timeFactory->getTime() - self::INVALIDATE_AFTER_SECONDS)) {
136 136
 						return $jsonBlob['data'];
137 137
 					}
138 138
 
Please login to merge, or discard this patch.
apps/dav/lib/CardDAV/ImageExportPlugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			return true;
73 73
 		}
74 74
 
75
-		$size = isset($queryParams['size']) ? (int)$queryParams['size'] : -1;
75
+		$size = isset($queryParams['size']) ? (int) $queryParams['size'] : -1;
76 76
 
77 77
 		$path = $request->getPath();
78 78
 		$node = $this->server->tree->getNodeForPath($path);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 		$addressbook = $this->server->tree->getNodeForPath($addressbookpath);
98 98
 
99 99
 		$response->setHeader('Cache-Control', 'private, max-age=3600, must-revalidate');
100
-		$response->setHeader('Etag', $node->getETag() );
100
+		$response->setHeader('Etag', $node->getETag());
101 101
 		$response->setHeader('Pragma', 'public');
102 102
 
103 103
 		try {
Please login to merge, or discard this patch.
lib/private/Config.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 * @return mixed the value or $default
86 86
 	 */
87 87
 	public function getValue($key, $default = null) {
88
-		$envValue = getenv(self::ENV_PREFIX . $key);
88
+		$envValue = getenv(self::ENV_PREFIX.$key);
89 89
 		if ($envValue !== false) {
90 90
 			return $envValue;
91 91
 		}
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 		foreach ($configFiles as $file) {
198 198
 			$fileExistsAndIsReadable = file_exists($file) && is_readable($file);
199 199
 			$filePointer = $fileExistsAndIsReadable ? fopen($file, 'r') : false;
200
-			if($file === $this->configFilePath &&
200
+			if ($file === $this->configFilePath &&
201 201
 				$filePointer === false) {
202 202
 				// Opening the main config might not be possible, e.g. if the wrong
203 203
 				// permissions are set (likely on a new installation)
@@ -205,13 +205,13 @@  discard block
 block discarded – undo
205 205
 			}
206 206
 
207 207
 			// Try to acquire a file lock
208
-			if(!flock($filePointer, LOCK_SH)) {
208
+			if (!flock($filePointer, LOCK_SH)) {
209 209
 				throw new \Exception(sprintf('Could not acquire a shared lock on the config file %s', $file));
210 210
 			}
211 211
 
212 212
 			unset($CONFIG);
213 213
 			include $file;
214
-			if(isset($CONFIG) && is_array($CONFIG)) {
214
+			if (isset($CONFIG) && is_array($CONFIG)) {
215 215
 				$this->cache = array_merge($this->cache, $CONFIG);
216 216
 			}
217 217
 
@@ -236,29 +236,29 @@  discard block
 block discarded – undo
236 236
 		$content .= var_export($this->cache, true);
237 237
 		$content .= ";\n";
238 238
 
239
-		touch ($this->configFilePath);
239
+		touch($this->configFilePath);
240 240
 		$filePointer = fopen($this->configFilePath, 'r+');
241 241
 
242 242
 		// Prevent others not to read the config
243 243
 		chmod($this->configFilePath, 0640);
244 244
 
245 245
 		// File does not exist, this can happen when doing a fresh install
246
-		if(!is_resource ($filePointer)) {
246
+		if (!is_resource($filePointer)) {
247 247
 			// TODO fix this via DI once it is very clear that this doesn't cause side effects due to initialization order
248 248
 			// currently this breaks app routes but also could have other side effects especially during setup and exception handling
249 249
 			$url = \OC::$server->getURLGenerator()->linkToDocs('admin-dir_permissions');
250 250
 			throw new HintException(
251 251
 				"Can't write into config directory!",
252
-				'This can usually be fixed by giving the webserver write access to the config directory. See ' . $url);
252
+				'This can usually be fixed by giving the webserver write access to the config directory. See '.$url);
253 253
 		}
254 254
 
255 255
 		// Try to acquire a file lock
256
-		if(!flock($filePointer, LOCK_EX)) {
256
+		if (!flock($filePointer, LOCK_EX)) {
257 257
 			throw new \Exception(sprintf('Could not acquire an exclusive lock on the config file %s', $this->configFilePath));
258 258
 		}
259 259
 
260 260
 		// Write the config and release the lock
261
-		ftruncate ($filePointer, 0);
261
+		ftruncate($filePointer, 0);
262 262
 		fwrite($filePointer, $content);
263 263
 		fflush($filePointer);
264 264
 		flock($filePointer, LOCK_UN);
Please login to merge, or discard this patch.
lib/private/App/CodeChecker/LanguageParseChecker.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
 			throw new \RuntimeException("No app with given id <$appId> known.");
36 36
 		}
37 37
 
38
-		if (!is_dir($appPath . '/l10n/')) {
38
+		if (!is_dir($appPath.'/l10n/')) {
39 39
 			return [];
40 40
 		}
41 41
 
42 42
 		$errors = [];
43
-		$directory = new \DirectoryIterator($appPath . '/l10n/');
43
+		$directory = new \DirectoryIterator($appPath.'/l10n/');
44 44
 
45 45
 		foreach ($directory as $file) {
46 46
 			if ($file->getExtension() !== 'json') {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 			json_decode($content, true);
52 52
 
53 53
 			if (json_last_error() !== JSON_ERROR_NONE) {
54
-				$errors[] = 'Invalid language file found: l10n/' . $file->getFilename() . ': ' . json_last_error_msg();
54
+				$errors[] = 'Invalid language file found: l10n/'.$file->getFilename().': '.json_last_error_msg();
55 55
 			}
56 56
 		}
57 57
 
Please login to merge, or discard this patch.
apps/files_external/lib/Command/Import.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			$json = file_get_contents('php://stdin');
113 113
 		} else {
114 114
 			if (!file_exists($path)) {
115
-				$output->writeln('<error>File not found: ' . $path . '</error>');
115
+				$output->writeln('<error>File not found: '.$path.'</error>');
116 116
 				return 1;
117 117
 			}
118 118
 			$json = file_get_contents($path);
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 					$existingMount->getApplicableUsers() === $mount->getApplicableUsers() &&
165 165
 					$existingMount->getBackendOptions() === $mount->getBackendOptions()
166 166
 				) {
167
-					$output->writeln("<error>Duplicate mount (" . $mount->getMountPoint() . ")</error>");
167
+					$output->writeln("<error>Duplicate mount (".$mount->getMountPoint().")</error>");
168 168
 					return 1;
169 169
 				}
170 170
 			}
Please login to merge, or discard this patch.
apps/files/ajax/download.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 OCP\User::checkLoggedIn();
32 32
 \OC::$server->getSession()->close();
33 33
 
34
-$files = isset($_GET['files']) ? (string)$_GET['files'] : '';
35
-$dir = isset($_GET['dir']) ? (string)$_GET['dir'] : '';
34
+$files = isset($_GET['files']) ? (string) $_GET['files'] : '';
35
+$dir = isset($_GET['dir']) ? (string) $_GET['dir'] : '';
36 36
 
37 37
 $files_list = json_decode($files);
38 38
 // in case we get only a single file
@@ -45,13 +45,13 @@  discard block
 block discarded – undo
45 45
  * the content must not be longer than 32 characters and must only contain
46 46
  * alphanumeric characters
47 47
  */
48
-if(isset($_GET['downloadStartSecret'])
48
+if (isset($_GET['downloadStartSecret'])
49 49
 	&& !isset($_GET['downloadStartSecret'][32])
50 50
 	&& preg_match('!^[a-zA-Z0-9]+$!', $_GET['downloadStartSecret']) === 1) {
51 51
 	setcookie('ocDownloadStarted', $_GET['downloadStartSecret'], time() + 20, '/');
52 52
 }
53 53
 
54
-$server_params = array( 'head' => \OC::$server->getRequest()->getMethod() === 'HEAD' );
54
+$server_params = array('head' => \OC::$server->getRequest()->getMethod() === 'HEAD');
55 55
 
56 56
 /**
57 57
  * Http range requests support
Please login to merge, or discard this patch.