Completed
Pull Request — master (#3813)
by Maxence
55:24
created
apps/files_sharing/lib/Controller/ShareAPIController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 		// FIXME: If we inject the contacts manager it gets initialized bofore any address books are registered
216 216
 		$result = \OC::$server->getContactsManager()->search($query, [$property]);
217 217
 		foreach ($result as $r) {
218
-			foreach($r[$property] as $value) {
218
+			foreach ($r[$property] as $value) {
219 219
 				if ($value === $query) {
220 220
 					return $r['FN'];
221 221
 				}
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
 
491 491
 		$shares = array_merge($userShares, $groupShares, $circleShares);
492 492
 
493
-		$shares = array_filter($shares, function (IShare $share) {
493
+		$shares = array_filter($shares, function(IShare $share) {
494 494
 			return $share->getShareOwner() !== $this->currentUser;
495 495
 		});
496 496
 
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
 			$shares = array_merge($shares, $this->shareManager->getSharesBy($this->currentUser, \OCP\Share::SHARE_TYPE_USER, $node, false, -1, 0));
526 526
 			$shares = array_merge($shares, $this->shareManager->getSharesBy($this->currentUser, \OCP\Share::SHARE_TYPE_GROUP, $node, false, -1, 0));
527 527
 			$shares = array_merge($shares, $this->shareManager->getSharesBy($this->currentUser, \OCP\Share::SHARE_TYPE_LINK, $node, false, -1, 0));
528
-			if($this->shareManager->shareProviderExists(\OCP\Share::SHARE_TYPE_EMAIL)) {
528
+			if ($this->shareManager->shareProviderExists(\OCP\Share::SHARE_TYPE_EMAIL)) {
529 529
 				$shares = array_merge($shares, $this->shareManager->getSharesBy($this->currentUser, \OCP\Share::SHARE_TYPE_EMAIL, $node, false, -1, 0));
530 530
 			}
531 531
 			if ($this->shareManager->outgoingServer2ServerSharesAllowed()) {
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 			}
683 683
 
684 684
 			if ($permissions !== null) {
685
-				$newPermissions = (int)$permissions;
685
+				$newPermissions = (int) $permissions;
686 686
 			}
687 687
 
688 688
 			if ($newPermissions !== null &&
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
 			if ($permissions === null) {
743 743
 				throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given'));
744 744
 			} else {
745
-				$permissions = (int)$permissions;
745
+				$permissions = (int) $permissions;
746 746
 				$share->setPermissions($permissions);
747 747
 			}
748 748
 		}
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
 
850 850
 		// First check if it is an internal share.
851 851
 		try {
852
-			$share = $this->shareManager->getShareById('ocinternal:' . $id);
852
+			$share = $this->shareManager->getShareById('ocinternal:'.$id);
853 853
 			return $share;
854 854
 		} catch (ShareNotFound $e) {
855 855
 			// Do nothing, just try the other share type
@@ -858,7 +858,7 @@  discard block
 block discarded – undo
858 858
 
859 859
 		try {
860 860
 			if ($this->shareManager->shareProviderExists(\OCP\Share::SHARE_TYPE_CIRCLE)) {
861
-				$share = $this->shareManager->getShareById('ocCircleShare:' . $id);
861
+				$share = $this->shareManager->getShareById('ocCircleShare:'.$id);
862 862
 				return $share;
863 863
 			}
864 864
 		} catch (ShareNotFound $e) {
@@ -867,7 +867,7 @@  discard block
 block discarded – undo
867 867
 
868 868
 		try {
869 869
 			if ($this->shareManager->shareProviderExists(\OCP\Share::SHARE_TYPE_EMAIL)) {
870
-				$share = $this->shareManager->getShareById('ocMailShare:' . $id);
870
+				$share = $this->shareManager->getShareById('ocMailShare:'.$id);
871 871
 				return $share;
872 872
 			}
873 873
 		} catch (ShareNotFound $e) {
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
 		if (!$this->shareManager->outgoingServer2ServerSharesAllowed()) {
878 878
 			throw new ShareNotFound();
879 879
 		}
880
-		$share = $this->shareManager->getShareById('ocFederatedSharing:' . $id);
880
+		$share = $this->shareManager->getShareById('ocFederatedSharing:'.$id);
881 881
 
882 882
 		return $share;
883 883
 	}
Please login to merge, or discard this patch.
apps/files_sharing/lib/MountProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 		$shares = array_merge($shares, $this->shareManager->getSharedWith($user->getUID(), \OCP\Share::SHARE_TYPE_CIRCLE, null, -1));
75 75
 
76 76
 		// filter out excluded shares and group shares that includes self
77
-		$shares = array_filter($shares, function (\OCP\Share\IShare $share) use ($user) {
77
+		$shares = array_filter($shares, function(\OCP\Share\IShare $share) use ($user) {
78 78
 			return $share->getPermissions() > 0 && $share->getShareOwner() !== $user->getUID();
79 79
 		});
80 80
 
Please login to merge, or discard this patch.
lib/private/Share20/ProviderFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		}
215 215
 
216 216
 		if ($provider === null) {
217
-			throw new ProviderException('No provider with id .' . $id . ' found.');
217
+			throw new ProviderException('No provider with id .'.$id.' found.');
218 218
 		}
219 219
 
220 220
 		return $provider;
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 
242 242
 
243 243
 		if ($provider === null) {
244
-			throw new ProviderException('No share provider for share type ' . $shareType);
244
+			throw new ProviderException('No share provider for share type '.$shareType);
245 245
 		}
246 246
 
247 247
 		return $provider;
Please login to merge, or discard this patch.