Passed
Push — master ( ebedbf...47a21f )
by Joas
12:46 queued 18s
created
core/Command/Group/ListCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	}
69 69
 
70 70
 	protected function execute(InputInterface $input, OutputInterface $output): int {
71
-		$groups = $this->groupManager->search('', (int)$input->getOption('limit'), (int)$input->getOption('offset'));
71
+		$groups = $this->groupManager->search('', (int) $input->getOption('limit'), (int) $input->getOption('offset'));
72 72
 		$this->writeArrayInOutputFormat($input, $output, $this->formatGroups($groups));
73 73
 		return 0;
74 74
 	}
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
 	 * @return array
79 79
 	 */
80 80
 	private function formatGroups(array $groups) {
81
-		$keys = array_map(function (IGroup $group) {
81
+		$keys = array_map(function(IGroup $group) {
82 82
 			return $group->getGID();
83 83
 		}, $groups);
84
-		$values = array_map(function (IGroup $group) {
84
+		$values = array_map(function(IGroup $group) {
85 85
 			return array_keys($group->getUsers());
86 86
 		}, $groups);
87 87
 		return array_combine($keys, $values);
Please login to merge, or discard this patch.
core/Command/Encryption/Enable.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,10 +73,10 @@
 block discarded – undo
73 73
 				$output->writeln('<error>No default module is set</error>');
74 74
 				return 1;
75 75
 			} elseif (!isset($modules[$defaultModule])) {
76
-				$output->writeln('<error>The current default module does not exist: ' . $defaultModule . '</error>');
76
+				$output->writeln('<error>The current default module does not exist: '.$defaultModule.'</error>');
77 77
 				return 1;
78 78
 			} else {
79
-				$output->writeln('Default module: ' . $defaultModule);
79
+				$output->writeln('Default module: '.$defaultModule);
80 80
 			}
81 81
 		}
82 82
 		return 0;
Please login to merge, or discard this patch.
core/Command/Encryption/SetDefaultModule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,11 +76,11 @@
 block discarded – undo
76 76
 		$moduleId = $input->getArgument('module');
77 77
 
78 78
 		if ($moduleId === $this->encryptionManager->getDefaultEncryptionModuleId()) {
79
-			$output->writeln('"' . $moduleId . '"" is already the default module');
79
+			$output->writeln('"'.$moduleId.'"" is already the default module');
80 80
 		} elseif ($this->encryptionManager->setDefaultEncryptionModule($moduleId)) {
81
-			$output->writeln('<info>Set default module to "' . $moduleId . '"</info>');
81
+			$output->writeln('<info>Set default module to "'.$moduleId.'"</info>');
82 82
 		} else {
83
-			$output->writeln('<error>The specified module "' . $moduleId . '" does not exist</error>');
83
+			$output->writeln('<error>The specified module "'.$moduleId.'" does not exist</error>');
84 84
 			return 1;
85 85
 		}
86 86
 		return 0;
Please login to merge, or discard this patch.
core/Command/Check.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 	protected function execute(InputInterface $input, OutputInterface $output): int {
54 54
 		$errors = \OC_Util::checkServer($this->config);
55 55
 		if (!empty($errors)) {
56
-			$errors = array_map(function ($item) {
56
+			$errors = array_map(function($item) {
57 57
 				return (string) $item['error'];
58 58
 			}, $errors);
59 59
 
Please login to merge, or discard this patch.
apps/encryption/lib/Command/RecoverUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,13 +84,13 @@
 block discarded – undo
84 84
 		$uid = $input->getArgument('user');
85 85
 		$userExists = $this->userManager->userExists($uid);
86 86
 		if ($userExists === false) {
87
-			$output->writeln('User "' . $uid . '" unknown.');
87
+			$output->writeln('User "'.$uid.'" unknown.');
88 88
 			return 1;
89 89
 		}
90 90
 
91 91
 		$recoveryKeyEnabled = $this->util->isRecoveryEnabledForUser($uid);
92 92
 		if ($recoveryKeyEnabled === false) {
93
-			$output->writeln('Recovery key is not enabled for: ' . $uid);
93
+			$output->writeln('Recovery key is not enabled for: '.$uid);
94 94
 			return 1;
95 95
 		}
96 96
 
Please login to merge, or discard this patch.
apps/dav/lib/Command/MoveCalendar.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -122,19 +122,19 @@  discard block
 block discarded – undo
122 122
 
123 123
 		$name = $input->getArgument('name');
124 124
 
125
-		$calendar = $this->calDav->getCalendarByUri(self::URI_USERS . $userOrigin, $name);
125
+		$calendar = $this->calDav->getCalendarByUri(self::URI_USERS.$userOrigin, $name);
126 126
 
127 127
 		if (null === $calendar) {
128 128
 			throw new \InvalidArgumentException("User <$userOrigin> has no calendar named <$name>. You can run occ dav:list-calendars to list calendars URIs for this user.");
129 129
 		}
130 130
 
131
-		if (null !== $this->calDav->getCalendarByUri(self::URI_USERS . $userDestination, $name)) {
131
+		if (null !== $this->calDav->getCalendarByUri(self::URI_USERS.$userDestination, $name)) {
132 132
 			throw new \InvalidArgumentException("User <$userDestination> already has a calendar named <$name>.");
133 133
 		}
134 134
 
135 135
 		$this->checkShares($calendar, $userOrigin, $userDestination, $input->getOption('force'));
136 136
 
137
-		$this->calDav->moveCalendar($name, self::URI_USERS . $userOrigin, self::URI_USERS . $userDestination);
137
+		$this->calDav->moveCalendar($name, self::URI_USERS.$userOrigin, self::URI_USERS.$userDestination);
138 138
 
139 139
 		$this->io->success("Calendar <$name> was moved from user <$userOrigin> to <$userDestination>");
140 140
 		return 0;
@@ -159,9 +159,9 @@  discard block
 block discarded – undo
159 159
 			 */
160 160
 			if ($this->shareManager->shareWithGroupMembersOnly() === true && 'groups' === $prefix && !$this->groupManager->isInGroup($userDestination, $userOrGroup)) {
161 161
 				if ($force) {
162
-					$this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config), [], ['href' => 'principal:principals/groups/' . $userOrGroup]);
162
+					$this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config), [], ['href' => 'principal:principals/groups/'.$userOrGroup]);
163 163
 				} else {
164
-					throw new \InvalidArgumentException("User <$userDestination> is not part of the group <$userOrGroup> with whom the calendar <" . $calendar['uri'] . "> was shared. You may use -f to move the calendar while deleting this share.");
164
+					throw new \InvalidArgumentException("User <$userDestination> is not part of the group <$userOrGroup> with whom the calendar <".$calendar['uri']."> was shared. You may use -f to move the calendar while deleting this share.");
165 165
 				}
166 166
 			}
167 167
 
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
 			 */
171 171
 			if ($userOrGroup === $userDestination) {
172 172
 				if ($force) {
173
-					$this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config), [], ['href' => 'principal:principals/users/' . $userOrGroup]);
173
+					$this->calDav->updateShares(new Calendar($this->calDav, $calendar, $this->l10n, $this->config), [], ['href' => 'principal:principals/users/'.$userOrGroup]);
174 174
 				} else {
175
-					throw new \InvalidArgumentException("The calendar <" . $calendar['uri'] . "> is already shared to user <$userDestination>.You may use -f to move the calendar while deleting this share.");
175
+					throw new \InvalidArgumentException("The calendar <".$calendar['uri']."> is already shared to user <$userDestination>.You may use -f to move the calendar while deleting this share.");
176 176
 				}
177 177
 			}
178 178
 		}
@@ -181,8 +181,8 @@  discard block
 block discarded – undo
181 181
 		 */
182 182
 		if (count($shares) > 0) {
183 183
 			$this->io->note([
184
-				"Please note that moving calendar " . $calendar['uri'] . " from user <$userOrigin> to <$userDestination> has caused share links to change.",
185
-				"Sharees will need to change \"example.com/remote.php/dav/calendars/uid/" . $calendar['uri'] . "_shared_by_$userOrigin\" to \"example.com/remote.php/dav/calendars/uid/" . $calendar['uri'] . "_shared_by_$userDestination\""
184
+				"Please note that moving calendar ".$calendar['uri']." from user <$userOrigin> to <$userDestination> has caused share links to change.",
185
+				"Sharees will need to change \"example.com/remote.php/dav/calendars/uid/".$calendar['uri']."_shared_by_$userOrigin\" to \"example.com/remote.php/dav/calendars/uid/".$calendar['uri']."_shared_by_$userDestination\""
186 186
 			]);
187 187
 		}
188 188
 	}
Please login to merge, or discard this patch.
apps/user_ldap/lib/Command/CheckUser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
 			$this->dui->markUser($uid);
105 105
 			$output->writeln('The user does not exists on LDAP anymore.');
106 106
 			$output->writeln('Clean up the user\'s remnants by: ./occ user:delete "'
107
-				. $uid . '"');
107
+				. $uid.'"');
108 108
 			return 0;
109 109
 		} catch (\Exception $e) {
110
-			$output->writeln('<error>' . $e->getMessage(). '</error>');
110
+			$output->writeln('<error>'.$e->getMessage().'</error>');
111 111
 			return 1;
112 112
 		}
113 113
 	}
@@ -153,12 +153,12 @@  discard block
 block discarded – undo
153 153
 			$avatarAttributes = $access->getConnection()->resolveRule('avatar');
154 154
 			$result = $access->search('objectclass=*', $user->getDN(), $attrs, 1, 0);
155 155
 			foreach ($result[0] as $attribute => $valueSet) {
156
-				$output->writeln('  ' . $attribute . ': ');
156
+				$output->writeln('  '.$attribute.': ');
157 157
 				foreach ($valueSet as $value) {
158 158
 					if (in_array($attribute, $avatarAttributes)) {
159 159
 						$value = '{ImageData}';
160 160
 					}
161
-					$output->writeln('    ' . $value);
161
+					$output->writeln('    '.$value);
162 162
 				}
163 163
 			}
164 164
 			$access->batchApplyUserAttributes($result);
Please login to merge, or discard this patch.
apps/user_ldap/lib/Command/Search.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		if ($limit < 0) {
95 95
 			throw new \InvalidArgumentException('limit must be  0 or greater');
96 96
 		}
97
-		if ($offset  < 0) {
97
+		if ($offset < 0) {
98 98
 			throw new \InvalidArgumentException('offset must be 0 or greater');
99 99
 		}
100 100
 		if ($limit === 0 && $offset !== 0) {
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
 		$configPrefixes = $helper->getServerConfigurationPrefixes(true);
111 111
 		$ldapWrapper = new LDAP();
112 112
 
113
-		$offset = (int)$input->getOption('offset');
114
-		$limit = (int)$input->getOption('limit');
113
+		$offset = (int) $input->getOption('offset');
114
+		$limit = (int) $input->getOption('limit');
115 115
 		$this->validateOffsetAndLimit($offset, $limit);
116 116
 
117 117
 		if ($input->getOption('group')) {
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
 		$result = $proxy->$getMethod($input->getArgument('search'), $limit, $offset);
140 140
 		foreach ($result as $id => $name) {
141
-			$line = $name . ($printID ? ' ('.$id.')' : '');
141
+			$line = $name.($printID ? ' ('.$id.')' : '');
142 142
 			$output->writeln($line);
143 143
 		}
144 144
 		return 0;
Please login to merge, or discard this patch.
apps/user_ldap/lib/Command/CreateEmptyConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 		if (!$input->getOption('only-print-prefix')) {
68 68
 			$prose = 'Created new configuration with configID ';
69 69
 		}
70
-		$output->writeln($prose . "{$configPrefix}");
70
+		$output->writeln($prose."{$configPrefix}");
71 71
 		return 0;
72 72
 	}
73 73
 }
Please login to merge, or discard this patch.