Passed
Push — master ( 8593ed...6e3b9e )
by Roeland
12:18
created
lib/private/DB/SQLiteSessionInit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@
 block discarded – undo
56 56
 	 */
57 57
 	public function postConnect(ConnectionEventArgs $args) {
58 58
 		$sensitive = $this->caseSensitiveLike ? 'true' : 'false';
59
-		$args->getConnection()->executeUpdate('PRAGMA case_sensitive_like = ' . $sensitive);
60
-		$args->getConnection()->executeUpdate('PRAGMA journal_mode = ' . $this->journalMode);
59
+		$args->getConnection()->executeUpdate('PRAGMA case_sensitive_like = '.$sensitive);
60
+		$args->getConnection()->executeUpdate('PRAGMA journal_mode = '.$this->journalMode);
61 61
 		/** @var \PDO $pdo */
62 62
 		$pdo = $args->getConnection()->getWrappedConnection();
63 63
 		$pdo->sqliteCreateFunction('md5', 'md5', 1);
Please login to merge, or discard this patch.
lib/private/legacy/image.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 */
134 134
 	public function widthTopLeft() {
135 135
 		$o = $this->getOrientation();
136
-		$this->logger->debug('OC_Image->widthTopLeft() Orientation: ' . $o, array('app' => 'core'));
136
+		$this->logger->debug('OC_Image->widthTopLeft() Orientation: '.$o, array('app' => 'core'));
137 137
 		switch ($o) {
138 138
 			case -1:
139 139
 			case 1:
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 */
158 158
 	public function heightTopLeft() {
159 159
 		$o = $this->getOrientation();
160
-		$this->logger->debug('OC_Image->heightTopLeft() Orientation: ' . $o, array('app' => 'core'));
160
+		$this->logger->debug('OC_Image->heightTopLeft() Orientation: '.$o, array('app' => 'core'));
161 161
 		switch ($o) {
162 162
 			case -1:
163 163
 			case 1:
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 		if ($mimeType === null) {
185 185
 			$mimeType = $this->mimeType();
186 186
 		}
187
-		header('Content-Type: ' . $mimeType);
187
+		header('Content-Type: '.$mimeType);
188 188
 		return $this->_output(null, $mimeType);
189 189
 	}
190 190
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 		}
203 203
 		if ($filePath === null) {
204 204
 			if ($this->filePath === null) {
205
-				$this->logger->error(__METHOD__ . '(): called with no path.', array('app' => 'core'));
205
+				$this->logger->error(__METHOD__.'(): called with no path.', array('app' => 'core'));
206 206
 				return false;
207 207
 			} else {
208 208
 				$filePath = $this->filePath;
@@ -226,10 +226,10 @@  discard block
 block discarded – undo
226 226
 			}
227 227
 			$isWritable = is_writable(dirname($filePath));
228 228
 			if (!$isWritable) {
229
-				$this->logger->error(__METHOD__ . '(): Directory \'' . dirname($filePath) . '\' is not writable.', array('app' => 'core'));
229
+				$this->logger->error(__METHOD__.'(): Directory \''.dirname($filePath).'\' is not writable.', array('app' => 'core'));
230 230
 				return false;
231 231
 			} elseif ($isWritable && file_exists($filePath) && !is_writable($filePath)) {
232
-				$this->logger->error(__METHOD__ . '(): File \'' . $filePath . '\' is not writable.', array('app' => 'core'));
232
+				$this->logger->error(__METHOD__.'(): File \''.$filePath.'\' is not writable.', array('app' => 'core'));
233 233
 				return false;
234 234
 			}
235 235
 		}
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 					$imageType = IMAGETYPE_BMP;
258 258
 					break;
259 259
 				default:
260
-					throw new Exception('\OC_Image::_output(): "' . $mimeType . '" is not supported when forcing a specific output format');
260
+					throw new Exception('\OC_Image::_output(): "'.$mimeType.'" is not supported when forcing a specific output format');
261 261
 			}
262 262
 		}
263 263
 
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 			return;
437 437
 		}
438 438
 
439
-		$exif = @exif_read_data('data://image/jpeg;base64,' . base64_encode($data));
439
+		$exif = @exif_read_data('data://image/jpeg;base64,'.base64_encode($data));
440 440
 		if (!$exif) {
441 441
 			return;
442 442
 		}
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 	 */
455 455
 	public function fixOrientation() {
456 456
 		$o = $this->getOrientation();
457
-		$this->logger->debug('OC_Image->fixOrientation() Orientation: ' . $o, array('app' => 'core'));
457
+		$this->logger->debug('OC_Image->fixOrientation() Orientation: '.$o, array('app' => 'core'));
458 458
 		$rotate = 0;
459 459
 		$flip = false;
460 460
 		switch ($o) {
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 				$rotate = 90;
490 490
 				break;
491 491
 		}
492
-		if($flip && function_exists('imageflip')) {
492
+		if ($flip && function_exists('imageflip')) {
493 493
 			imageflip($this->resource, IMG_FLIP_HORIZONTAL);
494 494
 		}
495 495
 		if ($rotate) {
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
 					imagealphablending($this->resource, true);
552 552
 					imagesavealpha($this->resource, true);
553 553
 				} else {
554
-					$this->logger->debug('OC_Image->loadFromFile, GIF images not supported: ' . $imagePath, array('app' => 'core'));
554
+					$this->logger->debug('OC_Image->loadFromFile, GIF images not supported: '.$imagePath, array('app' => 'core'));
555 555
 				}
556 556
 				break;
557 557
 			case IMAGETYPE_JPEG:
@@ -559,10 +559,10 @@  discard block
 block discarded – undo
559 559
 					if (getimagesize($imagePath) !== false) {
560 560
 						$this->resource = @imagecreatefromjpeg($imagePath);
561 561
 					} else {
562
-						$this->logger->debug('OC_Image->loadFromFile, JPG image not valid: ' . $imagePath, array('app' => 'core'));
562
+						$this->logger->debug('OC_Image->loadFromFile, JPG image not valid: '.$imagePath, array('app' => 'core'));
563 563
 					}
564 564
 				} else {
565
-					$this->logger->debug('OC_Image->loadFromFile, JPG images not supported: ' . $imagePath, array('app' => 'core'));
565
+					$this->logger->debug('OC_Image->loadFromFile, JPG images not supported: '.$imagePath, array('app' => 'core'));
566 566
 				}
567 567
 				break;
568 568
 			case IMAGETYPE_PNG:
@@ -572,21 +572,21 @@  discard block
 block discarded – undo
572 572
 					imagealphablending($this->resource, true);
573 573
 					imagesavealpha($this->resource, true);
574 574
 				} else {
575
-					$this->logger->debug('OC_Image->loadFromFile, PNG images not supported: ' . $imagePath, array('app' => 'core'));
575
+					$this->logger->debug('OC_Image->loadFromFile, PNG images not supported: '.$imagePath, array('app' => 'core'));
576 576
 				}
577 577
 				break;
578 578
 			case IMAGETYPE_XBM:
579 579
 				if (imagetypes() & IMG_XPM) {
580 580
 					$this->resource = @imagecreatefromxbm($imagePath);
581 581
 				} else {
582
-					$this->logger->debug('OC_Image->loadFromFile, XBM/XPM images not supported: ' . $imagePath, array('app' => 'core'));
582
+					$this->logger->debug('OC_Image->loadFromFile, XBM/XPM images not supported: '.$imagePath, array('app' => 'core'));
583 583
 				}
584 584
 				break;
585 585
 			case IMAGETYPE_WBMP:
586 586
 				if (imagetypes() & IMG_WBMP) {
587 587
 					$this->resource = @imagecreatefromwbmp($imagePath);
588 588
 				} else {
589
-					$this->logger->debug('OC_Image->loadFromFile, WBMP images not supported: ' . $imagePath, array('app' => 'core'));
589
+					$this->logger->debug('OC_Image->loadFromFile, WBMP images not supported: '.$imagePath, array('app' => 'core'));
590 590
 				}
591 591
 				break;
592 592
 			case IMAGETYPE_BMP:
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
 	 */
697 697
 	private function imagecreatefrombmp($fileName) {
698 698
 		if (!($fh = fopen($fileName, 'rb'))) {
699
-			$this->logger->warning('imagecreatefrombmp: Can not open ' . $fileName, array('app' => 'core'));
699
+			$this->logger->warning('imagecreatefrombmp: Can not open '.$fileName, array('app' => 'core'));
700 700
 			return false;
701 701
 		}
702 702
 		// read file header
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
 		// check for bitmap
705 705
 		if ($meta['type'] != 19778) {
706 706
 			fclose($fh);
707
-			$this->logger->warning('imagecreatefrombmp: Can not open ' . $fileName . ' is not a bitmap!', array('app' => 'core'));
707
+			$this->logger->warning('imagecreatefrombmp: Can not open '.$fileName.' is not a bitmap!', array('app' => 'core'));
708 708
 			return false;
709 709
 		}
710 710
 		// read image header
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
 				$meta['imagesize'] = @filesize($fileName) - $meta['offset'];
729 729
 				if ($meta['imagesize'] < 1) {
730 730
 					fclose($fh);
731
-					$this->logger->warning('imagecreatefrombmp: Can not obtain file size of ' . $fileName . ' is not a bitmap!', array('app' => 'core'));
731
+					$this->logger->warning('imagecreatefrombmp: Can not obtain file size of '.$fileName.' is not a bitmap!', array('app' => 'core'));
732 732
 					return false;
733 733
 				}
734 734
 			}
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 		// read color palette
739 739
 		$palette = array();
740 740
 		if ($meta['bits'] < 16) {
741
-			$palette = unpack('l' . $meta['colors'], fread($fh, $meta['colors'] * 4));
741
+			$palette = unpack('l'.$meta['colors'], fread($fh, $meta['colors'] * 4));
742 742
 			// in rare cases the color value is signed
743 743
 			if ($palette[1] < 0) {
744 744
 				foreach ($palette as $i => $color) {
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
 		if ($im == false) {
752 752
 			fclose($fh);
753 753
 			$this->logger->warning(
754
-				'imagecreatefrombmp: imagecreatetruecolor failed for file "' . $fileName . '" with dimensions ' . $meta['width'] . 'x' . $meta['height'],
754
+				'imagecreatefrombmp: imagecreatetruecolor failed for file "'.$fileName.'" with dimensions '.$meta['width'].'x'.$meta['height'],
755 755
 				array('app' => 'core'));
756 756
 			return false;
757 757
 		}
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
 		$p = 0;
761 761
 		$vide = chr(0);
762 762
 		$y = $meta['height'] - 1;
763
-		$error = 'imagecreatefrombmp: ' . $fileName . ' has not enough data!';
763
+		$error = 'imagecreatefrombmp: '.$fileName.' has not enough data!';
764 764
 		// loop through the image data beginning with the lower left corner
765 765
 		while ($y >= 0) {
766 766
 			$x = 0;
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
 							$this->logger->warning($error, array('app' => 'core'));
773 773
 							return $im;
774 774
 						}
775
-						$color = @unpack('V', $part . $vide);
775
+						$color = @unpack('V', $part.$vide);
776 776
 						break;
777 777
 					case 16:
778 778
 						if (!($part = substr($data, $p, 2))) {
@@ -784,16 +784,16 @@  discard block
 block discarded – undo
784 784
 						$color[1] = (($color[1] & 0xf800) >> 8) * 65536 + (($color[1] & 0x07e0) >> 3) * 256 + (($color[1] & 0x001f) << 3);
785 785
 						break;
786 786
 					case 8:
787
-						$color = @unpack('n', $vide . ($data[$p] ?? ''));
787
+						$color = @unpack('n', $vide.($data[$p] ?? ''));
788 788
 						$color[1] = isset($palette[$color[1] + 1]) ? $palette[$color[1] + 1] : $palette[1];
789 789
 						break;
790 790
 					case 4:
791
-						$color = @unpack('n', $vide . ($data[floor($p)] ?? ''));
791
+						$color = @unpack('n', $vide.($data[floor($p)] ?? ''));
792 792
 						$color[1] = ($p * 2) % 2 == 0 ? $color[1] >> 4 : $color[1] & 0x0F;
793 793
 						$color[1] = isset($palette[$color[1] + 1]) ? $palette[$color[1] + 1] : $palette[1];
794 794
 						break;
795 795
 					case 1:
796
-						$color = @unpack('n', $vide . ($data[floor($p)] ?? ''));
796
+						$color = @unpack('n', $vide.($data[floor($p)] ?? ''));
797 797
 						switch (($p * 8) % 8) {
798 798
 							case 0:
799 799
 								$color[1] = $color[1] >> 7;
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
 						break;
825 825
 					default:
826 826
 						fclose($fh);
827
-						$this->logger->warning('imagecreatefrombmp: ' . $fileName . ' has ' . $meta['bits'] . ' bits and this is not supported!', array('app' => 'core'));
827
+						$this->logger->warning('imagecreatefrombmp: '.$fileName.' has '.$meta['bits'].' bits and this is not supported!', array('app' => 'core'));
828 828
 						return false;
829 829
 				}
830 830
 				imagesetpixel($im, $x, $y, $color[1]);
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
 	 */
847 847
 	public function resize($maxSize) {
848 848
 		if (!$this->valid()) {
849
-			$this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core'));
849
+			$this->logger->error(__METHOD__.'(): No image loaded', array('app' => 'core'));
850 850
 			return false;
851 851
 		}
852 852
 		$widthOrig = imagesx($this->resource);
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
 			$newHeight = $maxSize;
862 862
 		}
863 863
 
864
-		$this->preciseResize((int)round($newWidth), (int)round($newHeight));
864
+		$this->preciseResize((int) round($newWidth), (int) round($newHeight));
865 865
 		return true;
866 866
 	}
867 867
 
@@ -872,7 +872,7 @@  discard block
 block discarded – undo
872 872
 	 */
873 873
 	public function preciseResize(int $width, int $height): bool {
874 874
 		if (!$this->valid()) {
875
-			$this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core'));
875
+			$this->logger->error(__METHOD__.'(): No image loaded', array('app' => 'core'));
876 876
 			return false;
877 877
 		}
878 878
 		$widthOrig = imagesx($this->resource);
@@ -880,7 +880,7 @@  discard block
 block discarded – undo
880 880
 		$process = imagecreatetruecolor($width, $height);
881 881
 
882 882
 		if ($process == false) {
883
-			$this->logger->error(__METHOD__ . '(): Error creating true color image', array('app' => 'core'));
883
+			$this->logger->error(__METHOD__.'(): Error creating true color image', array('app' => 'core'));
884 884
 			imagedestroy($process);
885 885
 			return false;
886 886
 		}
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
 
895 895
 		imagecopyresampled($process, $this->resource, 0, 0, 0, 0, $width, $height, $widthOrig, $heightOrig);
896 896
 		if ($process == false) {
897
-			$this->logger->error(__METHOD__ . '(): Error re-sampling process image', array('app' => 'core'));
897
+			$this->logger->error(__METHOD__.'(): Error re-sampling process image', array('app' => 'core'));
898 898
 			imagedestroy($process);
899 899
 			return false;
900 900
 		}
@@ -952,7 +952,7 @@  discard block
 block discarded – undo
952 952
 
953 953
 		imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $targetWidth, $targetHeight, $width, $height);
954 954
 		if ($process == false) {
955
-			$this->logger->error('OC_Image->centerCrop, Error re-sampling process image ' . $width . 'x' . $height, array('app' => 'core'));
955
+			$this->logger->error('OC_Image->centerCrop, Error re-sampling process image '.$width.'x'.$height, array('app' => 'core'));
956 956
 			imagedestroy($process);
957 957
 			return false;
958 958
 		}
@@ -972,12 +972,12 @@  discard block
 block discarded – undo
972 972
 	 */
973 973
 	public function crop(int $x, int $y, int $w, int $h): bool {
974 974
 		if (!$this->valid()) {
975
-			$this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core'));
975
+			$this->logger->error(__METHOD__.'(): No image loaded', array('app' => 'core'));
976 976
 			return false;
977 977
 		}
978 978
 		$process = imagecreatetruecolor($w, $h);
979 979
 		if ($process == false) {
980
-			$this->logger->error(__METHOD__ . '(): Error creating true color image', array('app' => 'core'));
980
+			$this->logger->error(__METHOD__.'(): Error creating true color image', array('app' => 'core'));
981 981
 			imagedestroy($process);
982 982
 			return false;
983 983
 		}
@@ -991,7 +991,7 @@  discard block
 block discarded – undo
991 991
 
992 992
 		imagecopyresampled($process, $this->resource, 0, 0, $x, $y, $w, $h, $w, $h);
993 993
 		if ($process == false) {
994
-			$this->logger->error(__METHOD__ . '(): Error re-sampling process image ' . $w . 'x' . $h, array('app' => 'core'));
994
+			$this->logger->error(__METHOD__.'(): Error re-sampling process image '.$w.'x'.$h, array('app' => 'core'));
995 995
 			imagedestroy($process);
996 996
 			return false;
997 997
 		}
@@ -1011,7 +1011,7 @@  discard block
 block discarded – undo
1011 1011
 	 */
1012 1012
 	public function fitIn($maxWidth, $maxHeight) {
1013 1013
 		if (!$this->valid()) {
1014
-			$this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core'));
1014
+			$this->logger->error(__METHOD__.'(): No image loaded', array('app' => 'core'));
1015 1015
 			return false;
1016 1016
 		}
1017 1017
 		$widthOrig = imagesx($this->resource);
@@ -1021,7 +1021,7 @@  discard block
 block discarded – undo
1021 1021
 		$newWidth = min($maxWidth, $ratio * $maxHeight);
1022 1022
 		$newHeight = min($maxHeight, $maxWidth / $ratio);
1023 1023
 
1024
-		$this->preciseResize((int)round($newWidth), (int)round($newHeight));
1024
+		$this->preciseResize((int) round($newWidth), (int) round($newHeight));
1025 1025
 		return true;
1026 1026
 	}
1027 1027
 
@@ -1034,7 +1034,7 @@  discard block
 block discarded – undo
1034 1034
 	 */
1035 1035
 	public function scaleDownToFit($maxWidth, $maxHeight) {
1036 1036
 		if (!$this->valid()) {
1037
-			$this->logger->error(__METHOD__ . '(): No image loaded', array('app' => 'core'));
1037
+			$this->logger->error(__METHOD__.'(): No image loaded', array('app' => 'core'));
1038 1038
 			return false;
1039 1039
 		}
1040 1040
 		$widthOrig = imagesx($this->resource);
@@ -1092,7 +1092,7 @@  discard block
 block discarded – undo
1092 1092
 		if ($bit <= 8) {
1093 1093
 			for ($i = 0; $i < $colorsNum; $i++) {
1094 1094
 				$colors = imagecolorsforindex($im, $i);
1095
-				$rgbQuad .= chr($colors['blue']) . chr($colors['green']) . chr($colors['red']) . "\0";
1095
+				$rgbQuad .= chr($colors['blue']).chr($colors['green']).chr($colors['red'])."\0";
1096 1096
 			}
1097 1097
 			$bmpData = '';
1098 1098
 			if ($compression == 0 || $bit < 8) {
@@ -1125,7 +1125,7 @@  discard block
 block discarded – undo
1125 1125
 						$index = imagecolorat($im, $i, $j);
1126 1126
 						if ($index !== $lastIndex || $sameNum > 255) {
1127 1127
 							if ($sameNum != 0) {
1128
-								$bmpData .= chr($sameNum) . chr($lastIndex);
1128
+								$bmpData .= chr($sameNum).chr($lastIndex);
1129 1129
 							}
1130 1130
 							$lastIndex = $index;
1131 1131
 							$sameNum = 1;
@@ -1166,15 +1166,15 @@  discard block
 block discarded – undo
1166 1166
 			$sizeData = strlen($bmpData);
1167 1167
 			$colorsNum = 0;
1168 1168
 		}
1169
-		$fileHeader = 'BM' . pack('V3', 54 + $sizeQuad + $sizeData, 0, 54 + $sizeQuad);
1169
+		$fileHeader = 'BM'.pack('V3', 54 + $sizeQuad + $sizeData, 0, 54 + $sizeQuad);
1170 1170
 		$infoHeader = pack('V3v2V*', 0x28, $width, $height, 1, $bit, $compression, $sizeData, 0, 0, $colorsNum, 0);
1171 1171
 		if ($fileName != '') {
1172 1172
 			$fp = fopen($fileName, 'wb');
1173
-			fwrite($fp, $fileHeader . $infoHeader . $rgbQuad . $bmpData);
1173
+			fwrite($fp, $fileHeader.$infoHeader.$rgbQuad.$bmpData);
1174 1174
 			fclose($fp);
1175 1175
 			return true;
1176 1176
 		}
1177
-		echo $fileHeader . $infoHeader . $rgbQuad . $bmpData;
1177
+		echo $fileHeader.$infoHeader.$rgbQuad.$bmpData;
1178 1178
 		return true;
1179 1179
 	}
1180 1180
 }
Please login to merge, or discard this patch.
lib/private/Files/Cache/Storage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
 		$this->storageId = self::adjustStorageId($this->storageId);
70 70
 
71 71
 		if ($row = self::getStorageById($this->storageId)) {
72
-			$this->numericId = (int)$row['numeric_id'];
72
+			$this->numericId = (int) $row['numeric_id'];
73 73
 		} else {
74 74
 			$connection = \OC::$server->getDatabaseConnection();
75 75
 			$available = $isAvailable ? 1 : 0;
76 76
 			if ($connection->insertIfNotExist('*PREFIX*storages', ['id' => $this->storageId, 'available' => $available])) {
77
-				$this->numericId = (int)$connection->lastInsertId('*PREFIX*storages');
77
+				$this->numericId = (int) $connection->lastInsertId('*PREFIX*storages');
78 78
 			} else {
79 79
 				if ($row = self::getStorageById($this->storageId)) {
80
-					$this->numericId = (int)$row['numeric_id'];
80
+					$this->numericId = (int) $row['numeric_id'];
81 81
 				} else {
82 82
 					throw new \RuntimeException('Storage could neither be inserted nor be selected from the database');
83 83
 				}
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 		$storageId = self::adjustStorageId($storageId);
143 143
 
144 144
 		if ($row = self::getStorageById($storageId)) {
145
-			return (int)$row['numeric_id'];
145
+			return (int) $row['numeric_id'];
146 146
 		} else {
147 147
 			return null;
148 148
 		}
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	public function getAvailability() {
155 155
 		if ($row = self::getStorageById($this->storageId)) {
156 156
 			return [
157
-				'available' => (int)$row['available'] === 1,
157
+				'available' => (int) $row['available'] === 1,
158 158
 				'last_checked' => $row['last_checked']
159 159
 			];
160 160
 		} else {
Please login to merge, or discard this patch.
lib/private/Share/Helper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -93,14 +93,14 @@  discard block
 block discarded – undo
93 93
 			$params = array();
94 94
 			if (count($ids) == 1 && isset($uidOwner)) {
95 95
 				// FIXME: don't concat $parents, use Docrine's PARAM_INT_ARRAY approach
96
-				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, ' .
97
-					'`item_target`, `file_target`, `parent` ' .
98
-					'FROM `*PREFIX*share` ' .
96
+				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, '.
97
+					'`item_target`, `file_target`, `parent` '.
98
+					'FROM `*PREFIX*share` '.
99 99
 					'WHERE `parent` IN ('.$parents.') AND `uid_owner` = ? ';
100 100
 				$params[] = $uidOwner;
101 101
 			} else {
102
-				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, ' .
103
-					'`item_target`, `file_target`, `parent`, `uid_owner` ' .
102
+				$queryString = 'SELECT `id`, `share_with`, `item_type`, `share_type`, '.
103
+					'`item_target`, `file_target`, `parent`, `uid_owner` '.
104 104
 					'FROM `*PREFIX*share` WHERE `parent` IN ('.$parents.') ';
105 105
 			}
106 106
 			if ($excludeGroupChildren) {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 					'shareWith' => $item['share_with'],
118 118
 					'itemTarget' => $item['item_target'],
119 119
 					'itemType' => $item['item_type'],
120
-					'shareType' => (int)$item['share_type'],
120
+					'shareType' => (int) $item['share_type'],
121 121
 				);
122 122
 				if (isset($item['file_target'])) {
123 123
 					$tmpItem['fileTarget'] = $item['file_target'];
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 		if ($defaultExpireDate === 'yes') {
169 169
 			$enforceExpireDate = $config->getAppValue('core', 'shareapi_enforce_expire_date', 'no');
170 170
 			$defaultExpireSettings['defaultExpireDateSet'] = true;
171
-			$defaultExpireSettings['expireAfterDays'] = (int)$config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
171
+			$defaultExpireSettings['expireAfterDays'] = (int) $config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
172 172
 			$defaultExpireSettings['enforceExpireDate'] = $enforceExpireDate === 'yes';
173 173
 		}
174 174
 
Please login to merge, or discard this patch.
core/templates/layout.guest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,18 +18,18 @@
 block discarded – undo
18 18
 		<?php emit_script_loading_tags($_); ?>
19 19
 		<?php print_unescaped($_['headers']); ?>
20 20
 	</head>
21
-	<body id="<?php p($_['bodyid']);?>">
21
+	<body id="<?php p($_['bodyid']); ?>">
22 22
 		<?php include 'layout.noscript.warning.php'; ?>
23 23
 		<div class="wrapper">
24 24
 			<div class="v-align">
25
-				<?php if ($_['bodyid'] === 'body-login' ): ?>
25
+				<?php if ($_['bodyid'] === 'body-login'): ?>
26 26
 					<header role="banner">
27 27
 						<div id="header">
28 28
 							<div class="logo">
29 29
 								<h1 class="hidden-visually">
30 30
 									<?php p($theme->getName()); ?>
31 31
 								</h1>
32
-								<?php if(\OC::$server->getConfig()->getSystemValue('installed', false)
32
+								<?php if (\OC::$server->getConfig()->getSystemValue('installed', false)
33 33
 									&& \OC::$server->getConfig()->getAppValue('theming', 'logoMime', false)): ?>
34 34
 									<img src="<?php p($theme->getLogo()); ?>"/>
35 35
 								<?php endif; ?>
Please login to merge, or discard this patch.
lib/public/Settings/IManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	/**
37 37
 	 * @since 9.1.0
38 38
 	 */
39
-	const KEY_ADMIN_SECTION  = 'admin-section';
39
+	const KEY_ADMIN_SECTION = 'admin-section';
40 40
 
41 41
 	/**
42 42
 	 * @since 13.0.0
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	/**
47 47
 	 * @since 13.0.0
48 48
 	 */
49
-	const KEY_PERSONAL_SECTION  = 'personal-section';
49
+	const KEY_PERSONAL_SECTION = 'personal-section';
50 50
 
51 51
 	/**
52 52
 	 * @param string $type 'admin' or 'personal'
Please login to merge, or discard this patch.
lib/public/App.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 	 * @since 4.0.0
54 54
 	 * @deprecated 14.0.0 Use settings section in appinfo.xml to register personal admin sections
55 55
 	*/
56
-	public static function registerPersonal( $app, $page ) {
57
-		\OC_App::registerPersonal( $app, $page );
56
+	public static function registerPersonal($app, $page) {
57
+		\OC_App::registerPersonal($app, $page);
58 58
 	}
59 59
 
60 60
 	/**
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 	 * @since 4.0.0
66 66
 	 * @deprecated 14.0.0 Use settings section in appinfo.xml to register admin sections
67 67
 	 */
68
-	public static function registerAdmin( $app, $page ) {
69
-		\OC_App::registerAdmin( $app, $page );
68
+	public static function registerAdmin($app, $page) {
69
+		\OC_App::registerAdmin($app, $page);
70 70
 	}
71 71
 
72 72
 	/**
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 	 * @deprecated 14.0.0 ise \OC::$server->getAppManager()->getAppInfo($appId)
78 78
 	 * @since 4.0.0
79 79
 	*/
80
-	public static function getAppInfo( $app, $path=false ) {
81
-		return \OC_App::getAppInfo( $app, $path);
80
+	public static function getAppInfo($app, $path = false) {
81
+		return \OC_App::getAppInfo($app, $path);
82 82
 	}
83 83
 
84 84
 	/**
@@ -90,8 +90,8 @@  discard block
 block discarded – undo
90 90
 	 * @since 4.0.0
91 91
 	 * @deprecated 13.0.0 use \OC::$server->getAppManager()->isEnabledForUser($appId)
92 92
 	 */
93
-	public static function isEnabled( $app ) {
94
-		return \OC::$server->getAppManager()->isEnabledForUser( $app );
93
+	public static function isEnabled($app) {
94
+		return \OC::$server->getAppManager()->isEnabledForUser($app);
95 95
 	}
96 96
 
97 97
 	/**
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	 * @since 4.0.0
102 102
 	 * @deprecated 9.0.0 ownCloud core will handle disabled apps and redirects to valid URLs
103 103
 	*/
104
-	public static function checkAppEnabled( $app ) {
104
+	public static function checkAppEnabled($app) {
105 105
 	}
106 106
 
107 107
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 * @since 4.0.0
112 112
 	 * @deprecated 14.0.0 use \OC::$server->getAppManager()->getAppVersion($appId)
113 113
 	 */
114
-	public static function getAppVersion( $app ) {
114
+	public static function getAppVersion($app) {
115 115
 		return \OC::$server->getAppManager()->getAppVersion($app);
116 116
 	}
117 117
 }
Please login to merge, or discard this patch.
apps/dav/lib/Connector/Sabre/FilesPlugin.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 		$this->server->on('propPatch', array($this, 'handleUpdateProperties'));
169 169
 		$this->server->on('afterBind', array($this, 'sendFileIdHeader'));
170 170
 		$this->server->on('afterWriteContent', array($this, 'sendFileIdHeader'));
171
-		$this->server->on('afterMethod:GET', [$this,'httpGet']);
171
+		$this->server->on('afterMethod:GET', [$this, 'httpGet']);
172 172
 		$this->server->on('afterMethod:GET', array($this, 'handleDownloadToken'));
173 173
 		$this->server->on('afterResponse', function($request, ResponseInterface $response) {
174 174
 			$body = $response->getBody();
@@ -198,11 +198,11 @@  discard block
 block discarded – undo
198 198
 		if ($sourceDir !== $destinationDir) {
199 199
 			$sourceNodeFileInfo = $sourceNode->getFileInfo();
200 200
 			if ($sourceNodeFileInfo === null) {
201
-				throw new NotFound($source . ' does not exist');
201
+				throw new NotFound($source.' does not exist');
202 202
  			}
203 203
 
204 204
 			if (!$sourceNodeFileInfo->isDeletable()) {
205
-				throw new Forbidden($source . " cannot be deleted");
205
+				throw new Forbidden($source." cannot be deleted");
206 206
 			}
207 207
 		}
208 208
 	}
@@ -255,10 +255,10 @@  discard block
 block discarded – undo
255 255
 					Request::USER_AGENT_ANDROID_MOBILE_CHROME,
256 256
 					Request::USER_AGENT_FREEBOX,
257 257
 				])) {
258
-				$response->addHeader('Content-Disposition', 'attachment; filename="' . rawurlencode($filename) . '"');
258
+				$response->addHeader('Content-Disposition', 'attachment; filename="'.rawurlencode($filename).'"');
259 259
 			} else {
260
-				$response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\'' . rawurlencode($filename)
261
-													 . '; filename="' . rawurlencode($filename) . '"');
260
+				$response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\''.rawurlencode($filename)
261
+													 . '; filename="'.rawurlencode($filename).'"');
262 262
 			}
263 263
 		}
264 264
 
@@ -339,13 +339,13 @@  discard block
 block discarded – undo
339 339
 				}
340 340
 			});
341 341
 
342
-			$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
342
+			$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function() use ($node) {
343 343
 				return json_encode($this->previewManager->isAvailable($node->getFileInfo()));
344 344
 			});
345 345
 			$propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) {
346 346
 				return $node->getSize();
347 347
 			});
348
-			$propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function () use ($node) {
348
+			$propFind->handle(self::MOUNT_TYPE_PROPERTYNAME, function() use ($node) {
349 349
 				return $node->getFileInfo()->getMountPoint()->getMountType();
350 350
 			});
351 351
 		}
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 			list($path, $name) = \Sabre\Uri\split($filePath);
438 438
 			$info = \OC_FileChunking::decodeName($name);
439 439
 			if (!empty($info)) {
440
-				$filePath = $path . '/' . $info['name'];
440
+				$filePath = $path.'/'.$info['name'];
441 441
 			}
442 442
 		}
443 443
 
Please login to merge, or discard this patch.
lib/private/Streamer.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 class Streamer {
32 32
 	// array of regexp. Matching user agents will get tar instead of zip
33
-	private $preferTarFor = [ '/macintosh|mac os x/i' ];
33
+	private $preferTarFor = ['/macintosh|mac os x/i'];
34 34
 
35 35
 	// streamer instance
36 36
 	private $streamerInstance;
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 * @param int $numberOfFiles The number of files (and directories) that will
44 44
 	 *        be included in the streamed file
45 45
 	 */
46
-	public function __construct(IRequest $request, int $size, int $numberOfFiles){
46
+	public function __construct(IRequest $request, int $size, int $numberOfFiles) {
47 47
 
48 48
 		/**
49 49
 		 * zip32 constraints for a basic (without compression, volumes nor
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
 	 * Send HTTP headers
81 81
 	 * @param string $name 
82 82
 	 */
83
-	public function sendHeaders($name){
83
+	public function sendHeaders($name) {
84 84
 		$extension = $this->streamerInstance instanceof ZipStreamer ? '.zip' : '.tar';
85
-		$fullName = $name . $extension;
85
+		$fullName = $name.$extension;
86 86
 		$this->streamerInstance->sendHeaders($fullName);
87 87
 	}
88 88
 	
@@ -91,27 +91,27 @@  discard block
 block discarded – undo
91 91
 	 * @param string $dir
92 92
 	 * @param string $internalDir
93 93
 	 */
94
-	public function addDirRecursive($dir, $internalDir='') {
94
+	public function addDirRecursive($dir, $internalDir = '') {
95 95
 		$dirname = basename($dir);
96
-		$rootDir = $internalDir . $dirname;
96
+		$rootDir = $internalDir.$dirname;
97 97
 		if (!empty($rootDir)) {
98 98
 			$this->streamerInstance->addEmptyDir($rootDir);
99 99
 		}
100
-		$internalDir .= $dirname . '/';
100
+		$internalDir .= $dirname.'/';
101 101
 		// prevent absolute dirs
102 102
 		$internalDir = ltrim($internalDir, '/');
103 103
 
104
-		$files= \OC\Files\Filesystem::getDirectoryContent($dir);
105
-		foreach($files as $file) {
104
+		$files = \OC\Files\Filesystem::getDirectoryContent($dir);
105
+		foreach ($files as $file) {
106 106
 			$filename = $file['name'];
107
-			$file = $dir . '/' . $filename;
108
-			if(\OC\Files\Filesystem::is_file($file)) {
107
+			$file = $dir.'/'.$filename;
108
+			if (\OC\Files\Filesystem::is_file($file)) {
109 109
 				$filesize = \OC\Files\Filesystem::filesize($file);
110 110
 				$fileTime = \OC\Files\Filesystem::filemtime($file);
111 111
 				$fh = \OC\Files\Filesystem::fopen($file, 'r');
112
-				$this->addFileFromStream($fh, $internalDir . $filename, $filesize, $fileTime);
112
+				$this->addFileFromStream($fh, $internalDir.$filename, $filesize, $fileTime);
113 113
 				fclose($fh);
114
-			}elseif(\OC\Files\Filesystem::is_dir($file)) {
114
+			}elseif (\OC\Files\Filesystem::is_dir($file)) {
115 115
 				$this->addDirRecursive($file, $internalDir);
116 116
 			}
117 117
 		}
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 * @param string $dirName Directory Path and name to be added to the archive.
148 148
 	 * @return bool $success
149 149
 	 */
150
-	public function addEmptyDir($dirName){
150
+	public function addEmptyDir($dirName) {
151 151
 		return $this->streamerInstance->addEmptyDir($dirName);
152 152
 	}
153 153
 
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	 * closing, the file is completely written to the output stream.
158 158
 	 * @return bool $success
159 159
 	 */
160
-	public function finalize(){
160
+	public function finalize() {
161 161
 		return $this->streamerInstance->finalize();
162 162
 	}
163 163
 }
Please login to merge, or discard this patch.