@@ -65,13 +65,13 @@ |
||
65 | 65 | |
66 | 66 | $lastLogin = $user->getLastLogin(); |
67 | 67 | if ($lastLogin === 0) { |
68 | - $output->writeln('User ' . $user->getUID() . |
|
68 | + $output->writeln('User '.$user->getUID(). |
|
69 | 69 | ' has never logged in, yet.'); |
70 | 70 | } else { |
71 | 71 | $date = new \DateTime(); |
72 | 72 | $date->setTimestamp($lastLogin); |
73 | - $output->writeln($user->getUID() . |
|
74 | - '`s last login: ' . $date->format('d.m.Y H:i')); |
|
73 | + $output->writeln($user->getUID(). |
|
74 | + '`s last login: '.$date->format('d.m.Y H:i')); |
|
75 | 75 | } |
76 | 76 | return 0; |
77 | 77 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | protected function execute(InputInterface $input, OutputInterface $output): int { |
89 | 89 | $uid = $input->getArgument('uid'); |
90 | 90 | if ($this->userManager->userExists($uid)) { |
91 | - $output->writeln('<error>The user "' . $uid . '" already exists.</error>'); |
|
91 | + $output->writeln('<error>The user "'.$uid.'" already exists.</error>'); |
|
92 | 92 | return 1; |
93 | 93 | } |
94 | 94 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | $question = new Question('Confirm password: '); |
110 | 110 | $question->setHidden(true); |
111 | - $confirm = $helper->ask($input, $output,$question); |
|
111 | + $confirm = $helper->ask($input, $output, $question); |
|
112 | 112 | |
113 | 113 | if ($password !== $confirm) { |
114 | 114 | $output->writeln("<error>Passwords did not match!</error>"); |
@@ -125,13 +125,13 @@ discard block |
||
125 | 125 | $password |
126 | 126 | ); |
127 | 127 | } catch (\Exception $e) { |
128 | - $output->writeln('<error>' . $e->getMessage() . '</error>'); |
|
128 | + $output->writeln('<error>'.$e->getMessage().'</error>'); |
|
129 | 129 | return 1; |
130 | 130 | } |
131 | 131 | |
132 | 132 | |
133 | 133 | if ($user instanceof IUser) { |
134 | - $output->writeln('<info>The user "' . $user->getUID() . '" was created successfully</info>'); |
|
134 | + $output->writeln('<info>The user "'.$user->getUID().'" was created successfully</info>'); |
|
135 | 135 | } else { |
136 | 136 | $output->writeln('<error>An error occurred while creating the user</error>'); |
137 | 137 | return 1; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | if ($input->getOption('display-name')) { |
141 | 141 | $user->setDisplayName($input->getOption('display-name')); |
142 | - $output->writeln('Display name set to "' . $user->getDisplayName() . '"'); |
|
142 | + $output->writeln('Display name set to "'.$user->getDisplayName().'"'); |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | $groups = $input->getOption('group'); |
@@ -156,12 +156,12 @@ discard block |
||
156 | 156 | $this->groupManager->createGroup($groupName); |
157 | 157 | $group = $this->groupManager->get($groupName); |
158 | 158 | if ($group instanceof IGroup) { |
159 | - $output->writeln('Created group "' . $group->getGID() . '"'); |
|
159 | + $output->writeln('Created group "'.$group->getGID().'"'); |
|
160 | 160 | } |
161 | 161 | } |
162 | 162 | if ($group instanceof IGroup) { |
163 | 163 | $group->addUser($user); |
164 | - $output->writeln('User "' . $user->getUID() . '" added to group "' . $group->getGID() . '"'); |
|
164 | + $output->writeln('User "'.$user->getUID().'" added to group "'.$group->getGID().'"'); |
|
165 | 165 | } |
166 | 166 | } |
167 | 167 | return 0; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | protected function execute(InputInterface $input, OutputInterface $output): int { |
54 | 54 | $outputType = $input->getOption('output'); |
55 | 55 | if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { |
56 | - $certificates = array_map(function (ICertificate $certificate) { |
|
56 | + $certificates = array_map(function(ICertificate $certificate) { |
|
57 | 57 | return [ |
58 | 58 | 'name' => $certificate->getName(), |
59 | 59 | 'common_name' => $certificate->getCommonName(), |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | 'Issued By' |
80 | 80 | ]); |
81 | 81 | |
82 | - $rows = array_map(function (ICertificate $certificate) { |
|
82 | + $rows = array_map(function(ICertificate $certificate) { |
|
83 | 83 | return [ |
84 | 84 | $certificate->getName(), |
85 | 85 | $certificate->getCommonName(), |
@@ -58,18 +58,18 @@ |
||
58 | 58 | protected function execute(InputInterface $input, OutputInterface $output): int { |
59 | 59 | $gid = $input->getArgument('groupid'); |
60 | 60 | if ($gid === 'admin') { |
61 | - $output->writeln('<error>Group "' . $gid . '" could not be deleted.</error>'); |
|
61 | + $output->writeln('<error>Group "'.$gid.'" could not be deleted.</error>'); |
|
62 | 62 | return 1; |
63 | 63 | } |
64 | - if (! $this->groupManager->groupExists($gid)) { |
|
65 | - $output->writeln('<error>Group "' . $gid . '" does not exist.</error>'); |
|
64 | + if (!$this->groupManager->groupExists($gid)) { |
|
65 | + $output->writeln('<error>Group "'.$gid.'" does not exist.</error>'); |
|
66 | 66 | return 1; |
67 | 67 | } |
68 | 68 | $group = $this->groupManager->get($gid); |
69 | 69 | if ($group->delete()) { |
70 | - $output->writeln('Group "' . $gid . '" was removed'); |
|
70 | + $output->writeln('Group "'.$gid.'" was removed'); |
|
71 | 71 | } else { |
72 | - $output->writeln('<error>Group "' . $gid . '" could not be deleted. Please check the logs.</error>'); |
|
72 | + $output->writeln('<error>Group "'.$gid.'" could not be deleted. Please check the logs.</error>'); |
|
73 | 73 | return 1; |
74 | 74 | } |
75 | 75 | return 0; |
@@ -73,10 +73,10 @@ |
||
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; |
@@ -76,11 +76,11 @@ |
||
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; |
@@ -53,7 +53,7 @@ |
||
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 |
@@ -84,13 +84,13 @@ |
||
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 |
@@ -104,10 +104,10 @@ discard block |
||
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 |
||
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); |