Completed
Pull Request — master (#3770)
by Thomas
25:54
created
apps/files_sharing/lib/SharedStorage.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	 * @return string
161 161
 	 */
162 162
 	public function getId() {
163
-		return 'shared::' . $this->getMountPoint();
163
+		return 'shared::'.$this->getMountPoint();
164 164
 	}
165 165
 
166 166
 	/**
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 					}
257 257
 			}
258 258
 			$info = array(
259
-				'target' => $this->getMountPoint() . $path,
259
+				'target' => $this->getMountPoint().$path,
260 260
 				'source' => $source,
261 261
 				'mode' => $mode,
262 262
 			);
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 
458 458
 	public function file_get_contents($path) {
459 459
 		$info = [
460
-			'target' => $this->getMountPoint() . '/' . $path,
460
+			'target' => $this->getMountPoint().'/'.$path,
461 461
 			'source' => $this->getSourcePath($path),
462 462
 		];
463 463
 		\OCP\Util::emitHook('\OC\Files\Storage\Shared', 'file_get_contents', $info);
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 
467 467
 	public function file_put_contents($path, $data) {
468 468
 		$info = [
469
-			'target' => $this->getMountPoint() . '/' . $path,
469
+			'target' => $this->getMountPoint().'/'.$path,
470 470
 			'source' => $this->getSourcePath($path),
471 471
 		];
472 472
 		\OCP\Util::emitHook('\OC\Files\Storage\Shared', 'file_put_contents', $info);
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
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 		$shares = $this->shareManager->getSharedWith($user->getUID(), \OCP\Share::SHARE_TYPE_USER, null, -1);
72 72
 		$shares = array_merge($shares, $this->shareManager->getSharedWith($user->getUID(), \OCP\Share::SHARE_TYPE_GROUP, null, -1));
73 73
 		// filter out excluded shares and group shares that includes self
74
-		$shares = array_filter($shares, function (\OCP\Share\IShare $share) use ($user) {
74
+		$shares = array_filter($shares, function(\OCP\Share\IShare $share) use ($user) {
75 75
 			return $share->getPermissions() > 0 && $share->getShareOwner() !== $user->getUID();
76 76
 		});
77 77
 
Please login to merge, or discard this patch.
apps/files_sharing/lib/ShareBackend/File.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 */
97 97
 	public function generateTarget($filePath, $shareWith, $exclude = null) {
98 98
 		$shareFolder = \OCA\Files_Sharing\Helper::getShareFolder();
99
-		$target = \OC\Files\Filesystem::normalizePath($shareFolder . '/' . basename($filePath));
99
+		$target = \OC\Files\Filesystem::normalizePath($shareFolder.'/'.basename($filePath));
100 100
 
101 101
 		// for group shares we return the target right away
102 102
 		if ($shareWith === false) {
@@ -104,13 +104,13 @@  discard block
 block discarded – undo
104 104
 		}
105 105
 
106 106
 		\OC\Files\Filesystem::initMountPoints($shareWith);
107
-		$view = new \OC\Files\View('/' . $shareWith . '/files');
107
+		$view = new \OC\Files\View('/'.$shareWith.'/files');
108 108
 
109 109
 		if (!$view->is_dir($shareFolder)) {
110 110
 			$dir = '';
111 111
 			$subdirs = explode('/', $shareFolder);
112 112
 			foreach ($subdirs as $subdir) {
113
-				$dir = $dir . '/' . $subdir;
113
+				$dir = $dir.'/'.$subdir;
114 114
 				if (!$view->is_dir($dir)) {
115 115
 					$view->mkdir($dir);
116 116
 				}
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 		if ($share['item_type'] === 'folder' && $target !== '') {
238 238
 			// note: in case of ext storage mount points the path might be empty
239 239
 			// which would cause a leading slash to appear
240
-			$share['path'] = ltrim($share['path'] . '/' . $target, '/');
240
+			$share['path'] = ltrim($share['path'].'/'.$target, '/');
241 241
 		}
242 242
 		return self::resolveReshares($share);
243 243
 	}
Please login to merge, or discard this patch.
apps/files_sharing/public.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
 $token = isset($_GET['t']) ? $_GET['t'] : '';
28 28
 $route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare' : 'files_sharing.sharecontroller.showShare';
29 29
 
30
-if($token !== '') {
30
+if ($token !== '') {
31 31
 	OC_Response::redirect($urlGenerator->linkToRoute($route, array('token' => $token)));
32 32
 } else {
33 33
 	header('HTTP/1.0 404 Not Found');
Please login to merge, or discard this patch.
apps/provisioning_api/lib/Controller/AppsController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
 	public function getApps($filter = null) {
60 60
 		$apps = (new OC_App())->listAllApps();
61 61
 		$list = [];
62
-		foreach($apps as $app) {
62
+		foreach ($apps as $app) {
63 63
 			$list[] = $app['id'];
64 64
 		}
65
-		if($filter){
66
-			switch($filter){
65
+		if ($filter) {
66
+			switch ($filter) {
67 67
 				case 'enabled':
68 68
 					return new DataResponse(['apps' => \OC_App::getEnabledApps()]);
69 69
 					break;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 */
89 89
 	public function getAppInfo($app) {
90 90
 		$info = \OCP\App::getAppInfo($app);
91
-		if(!is_null($info)) {
91
+		if (!is_null($info)) {
92 92
 			return new DataResponse(OC_App::getAppInfo($app));
93 93
 		} else {
94 94
 			throw new OCSException('The request app was not found', \OCP\API::RESPOND_NOT_FOUND);
Please login to merge, or discard this patch.
apps/provisioning_api/lib/Controller/GroupsController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
 	 */
73 73
 	public function getGroups($search = '', $limit = null, $offset = null) {
74 74
 		if ($limit !== null) {
75
-			$limit = (int)$limit;
75
+			$limit = (int) $limit;
76 76
 		}
77 77
 		if ($offset !== null) {
78
-			$offset = (int)$offset;
78
+			$offset = (int) $offset;
79 79
 		}
80 80
 
81 81
 		$groups = $this->groupManager->search($search, $limit, $offset);
@@ -100,21 +100,21 @@  discard block
 block discarded – undo
100 100
 		$user = $this->userSession->getUser();
101 101
 
102 102
 		// Check the group exists
103
-		if(!$this->groupManager->groupExists($groupId)) {
103
+		if (!$this->groupManager->groupExists($groupId)) {
104 104
 			throw new OCSException('The requested group could not be found', \OCP\API::RESPOND_NOT_FOUND);
105 105
 		}
106 106
 
107 107
 		$isSubadminOfGroup = false;
108 108
 		$group = $this->groupManager->get($groupId);
109 109
 		if ($group !== null) {
110
-			$isSubadminOfGroup =$this->groupManager->getSubAdmin()->isSubAdminofGroup($user, $group);
110
+			$isSubadminOfGroup = $this->groupManager->getSubAdmin()->isSubAdminofGroup($user, $group);
111 111
 		}
112 112
 
113 113
 		// Check subadmin has access to this group
114
-		if($this->groupManager->isAdmin($user->getUID())
114
+		if ($this->groupManager->isAdmin($user->getUID())
115 115
 		   || $isSubadminOfGroup) {
116 116
 			$users = $this->groupManager->get($groupId)->getUsers();
117
-			$users =  array_map(function($user) {
117
+			$users = array_map(function($user) {
118 118
 				/** @var IUser $user */
119 119
 				return $user->getUID();
120 120
 			}, $users);
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
 	 */
137 137
 	public function addGroup($groupid) {
138 138
 		// Validate name
139
-		if(empty($groupid)){
139
+		if (empty($groupid)) {
140 140
 			\OCP\Util::writeLog('provisioning_api', 'Group name not supplied', \OCP\Util::ERROR);
141 141
 			throw new OCSException('Invalid group name', 101);
142 142
 		}
143 143
 		// Check if it exists
144
-		if($this->groupManager->groupExists($groupid)){
144
+		if ($this->groupManager->groupExists($groupid)) {
145 145
 			throw new OCSException('', 102);
146 146
 		}
147 147
 		$this->groupManager->createGroup($groupid);
@@ -157,9 +157,9 @@  discard block
 block discarded – undo
157 157
 	 */
158 158
 	public function deleteGroup($groupId) {
159 159
 		// Check it exists
160
-		if(!$this->groupManager->groupExists($groupId)){
160
+		if (!$this->groupManager->groupExists($groupId)) {
161 161
 			throw new OCSException('', 101);
162
-		} else if($groupId === 'admin' || !$this->groupManager->get($groupId)->delete()){
162
+		} else if ($groupId === 'admin' || !$this->groupManager->get($groupId)->delete()) {
163 163
 			// Cannot delete admin group
164 164
 			throw new OCSException('', 102);
165 165
 		}
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	public function getSubAdminsOfGroup($groupId) {
176 176
 		// Check group exists
177 177
 		$targetGroup = $this->groupManager->get($groupId);
178
-		if($targetGroup === null) {
178
+		if ($targetGroup === null) {
179 179
 			throw new OCSException('Group does not exist', 101);
180 180
 		}
181 181
 
Please login to merge, or discard this patch.
apps/updatenotification/templates/admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	$currentChannel = $_['currentChannel'];
15 15
 ?>
16 16
 <form id="oca_updatenotification_section" class="followupsection">
17
-	<?php if($isNewVersionAvailable === true) { ?>
17
+	<?php if ($isNewVersionAvailable === true) { ?>
18 18
 		<strong><?php p($l->t('A new version is available: %s', [$newVersionString])); ?></strong>
19 19
 		<?php if ($_['updaterEnabled']) { ?>
20 20
 			<input type="button" id="oca_updatenotification_button" value="<?php p($l->t('Open updater')) ?>">
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 		<label for="release-channel"><?php p($l->t('Update channel:')) ?></label>
32 32
 		<select id="release-channel">
33 33
 			<option value="<?php p($currentChannel); ?>"><?php p($currentChannel); ?></option>
34
-			<?php foreach ($channels as $channel => $channelTitle){ ?>
34
+			<?php foreach ($channels as $channel => $channelTitle) { ?>
35 35
 				<option value="<?php p($channelTitle) ?>">
36 36
 					<?php p($channelTitle) ?>
37 37
 				</option>
Please login to merge, or discard this patch.
apps/updatenotification/lib/Notification/Notifier.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 			$notification->setParsedSubject($l->t('Update to %1$s is available.', [$parameters['version']]));
92 92
 
93 93
 			if ($this->isAdmin()) {
94
-				$notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index') . '#updater');
94
+				$notification->setLink($this->url->linkToRouteAbsolute('settings.AdminSettings.index').'#updater');
95 95
 			}
96 96
 		} else {
97 97
 			$appInfo = $this->getAppInfo($notification->getObjectType());
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 				]);
112 112
 
113 113
 			if ($this->isAdmin()) {
114
-				$notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps') . '#app-' . $notification->getObjectType());
114
+				$notification->setLink($this->url->linkToRouteAbsolute('settings.AppSettings.viewApps').'#app-'.$notification->getObjectType());
115 115
 			}
116 116
 		}
117 117
 
Please login to merge, or discard this patch.
apps/updatenotification/lib/Controller/AdminController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 		$currentChannel = \OCP\Util::getChannel();
100 100
 
101 101
 		// Remove the currently used channel from the channels list
102
-		if(($key = array_search($currentChannel, $channels)) !== false) {
102
+		if (($key = array_search($currentChannel, $channels)) !== false) {
103 103
 			unset($channels[$key]);
104 104
 		}
105 105
 		$updateState = $this->updateChecker->getUpdateState();
Please login to merge, or discard this patch.