@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | protected function checkInput(InputInterface $input) { |
| 125 | 125 | $uid = $input->getArgument('uid'); |
| 126 | 126 | if (!$input->getOption('ignore-missing-user') && !$this->userManager->userExists($uid)) { |
| 127 | - throw new \InvalidArgumentException('The user "' . $uid . '" does not exists.'); |
|
| 127 | + throw new \InvalidArgumentException('The user "'.$uid.'" does not exists.'); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | if ($input->getArgument('key') === '' && $input->hasParameterOption('--default-value')) { |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | try { |
| 160 | 160 | $this->checkInput($input); |
| 161 | 161 | } catch (\InvalidArgumentException $e) { |
| 162 | - $output->writeln('<error>' . $e->getMessage() . '</error>'); |
|
| 162 | + $output->writeln('<error>'.$e->getMessage().'</error>'); |
|
| 163 | 163 | return 1; |
| 164 | 164 | } |
| 165 | 165 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $value = $this->config->getUserValue($uid, $app, $key, null); |
| 172 | 172 | if ($input->getArgument('value') !== null) { |
| 173 | 173 | if ($input->hasParameterOption('--update-only') && $value === null) { |
| 174 | - $output->writeln('<error>The setting does not exist for user "' . $uid . '".</error>'); |
|
| 174 | + $output->writeln('<error>The setting does not exist for user "'.$uid.'".</error>'); |
|
| 175 | 175 | return 1; |
| 176 | 176 | } |
| 177 | 177 | |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | |
| 189 | 189 | } else if ($input->hasParameterOption('--delete')) { |
| 190 | 190 | if ($input->hasParameterOption('--error-if-not-exists') && $value === null) { |
| 191 | - $output->writeln('<error>The setting does not exist for user "' . $uid . '".</error>'); |
|
| 191 | + $output->writeln('<error>The setting does not exist for user "'.$uid.'".</error>'); |
|
| 192 | 192 | return 1; |
| 193 | 193 | } |
| 194 | 194 | |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | $output->writeln($input->getOption('default-value')); |
| 212 | 212 | return 0; |
| 213 | 213 | } else { |
| 214 | - $output->writeln('<error>The setting does not exist for user "' . $uid . '".</error>'); |
|
| 214 | + $output->writeln('<error>The setting does not exist for user "'.$uid.'".</error>'); |
|
| 215 | 215 | return 1; |
| 216 | 216 | } |
| 217 | 217 | } |
@@ -117,12 +117,12 @@ |
||
| 117 | 117 | try { |
| 118 | 118 | $success = $user->setPassword($password); |
| 119 | 119 | } catch (\Exception $e) { |
| 120 | - $output->writeln('<error>' . $e->getMessage() . '</error>'); |
|
| 120 | + $output->writeln('<error>'.$e->getMessage().'</error>'); |
|
| 121 | 121 | return 1; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | if ($success) { |
| 125 | - $output->writeln("<info>Successfully reset password for " . $username . "</info>"); |
|
| 125 | + $output->writeln("<info>Successfully reset password for ".$username."</info>"); |
|
| 126 | 126 | } else { |
| 127 | 127 | $output->writeln("<error>Error while resetting password!</error>"); |
| 128 | 128 | return 1; |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | protected function execute(InputInterface $input, OutputInterface $output) { |
| 85 | 85 | $uid = $input->getArgument('uid'); |
| 86 | 86 | if ($this->userManager->userExists($uid)) { |
| 87 | - $output->writeln('<error>The user "' . $uid . '" already exists.</error>'); |
|
| 87 | + $output->writeln('<error>The user "'.$uid.'" already exists.</error>'); |
|
| 88 | 88 | return 1; |
| 89 | 89 | } |
| 90 | 90 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | $question = new Question('Confirm password: '); |
| 106 | 106 | $question->setHidden(true); |
| 107 | - $confirm = $helper->ask($input, $output,$question); |
|
| 107 | + $confirm = $helper->ask($input, $output, $question); |
|
| 108 | 108 | |
| 109 | 109 | if ($password !== $confirm) { |
| 110 | 110 | $output->writeln("<error>Passwords did not match!</error>"); |
@@ -121,13 +121,13 @@ discard block |
||
| 121 | 121 | $password |
| 122 | 122 | ); |
| 123 | 123 | } catch (\Exception $e) { |
| 124 | - $output->writeln('<error>' . $e->getMessage() . '</error>'); |
|
| 124 | + $output->writeln('<error>'.$e->getMessage().'</error>'); |
|
| 125 | 125 | return 1; |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | |
| 129 | 129 | if ($user instanceof IUser) { |
| 130 | - $output->writeln('<info>The user "' . $user->getUID() . '" was created successfully</info>'); |
|
| 130 | + $output->writeln('<info>The user "'.$user->getUID().'" was created successfully</info>'); |
|
| 131 | 131 | } else { |
| 132 | 132 | $output->writeln('<error>An error occurred while creating the user</error>'); |
| 133 | 133 | return 1; |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | if ($input->getOption('display-name')) { |
| 137 | 137 | $user->setDisplayName($input->getOption('display-name')); |
| 138 | - $output->writeln('Display name set to "' . $user->getDisplayName() . '"'); |
|
| 138 | + $output->writeln('Display name set to "'.$user->getDisplayName().'"'); |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | $groups = $input->getOption('group'); |
@@ -151,10 +151,10 @@ discard block |
||
| 151 | 151 | if (!$group) { |
| 152 | 152 | $this->groupManager->createGroup($groupName); |
| 153 | 153 | $group = $this->groupManager->get($groupName); |
| 154 | - $output->writeln('Created group "' . $group->getGID() . '"'); |
|
| 154 | + $output->writeln('Created group "'.$group->getGID().'"'); |
|
| 155 | 155 | } |
| 156 | 156 | $group->addUser($user); |
| 157 | - $output->writeln('User "' . $user->getUID() . '" added to group "' . $group->getGID() . '"'); |
|
| 157 | + $output->writeln('User "'.$user->getUID().'" added to group "'.$group->getGID().'"'); |
|
| 158 | 158 | } |
| 159 | 159 | } |
| 160 | 160 | } |
@@ -53,10 +53,10 @@ |
||
| 53 | 53 | $table = new Table($output); |
| 54 | 54 | $table->setHeaders(array('User Report', '')); |
| 55 | 55 | $userCountArray = $this->countUsers(); |
| 56 | - if(!empty($userCountArray)) { |
|
| 56 | + if (!empty($userCountArray)) { |
|
| 57 | 57 | $total = 0; |
| 58 | 58 | $rows = array(); |
| 59 | - foreach($userCountArray as $classname => $users) { |
|
| 59 | + foreach ($userCountArray as $classname => $users) { |
|
| 60 | 60 | $total += $users; |
| 61 | 61 | $rows[] = array($classname, $users); |
| 62 | 62 | } |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | */ |
| 72 | 72 | protected function execute(InputInterface $input, OutputInterface $output) { |
| 73 | 73 | $mode = $this->getMode(); |
| 74 | - $this->config->setAppValue( 'core', 'backgroundjobs_mode', $mode ); |
|
| 74 | + $this->config->setAppValue('core', 'backgroundjobs_mode', $mode); |
|
| 75 | 75 | $output->writeln("Set mode for background jobs to '$mode'"); |
| 76 | 76 | } |
| 77 | 77 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | if (sizeof($configNames) > 1) { |
| 68 | 68 | if ($input->hasParameterOption('--error-if-not-exists') && !in_array($configName, $this->systemConfig->getKeys())) { |
| 69 | - $output->writeln('<error>System config ' . implode(' => ', $configNames) . ' could not be deleted because it did not exist</error>'); |
|
| 69 | + $output->writeln('<error>System config '.implode(' => ', $configNames).' could not be deleted because it did not exist</error>'); |
|
| 70 | 70 | return 1; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -76,21 +76,21 @@ discard block |
||
| 76 | 76 | $value = $this->removeSubValue(array_slice($configNames, 1), $value, $input->hasParameterOption('--error-if-not-exists')); |
| 77 | 77 | } |
| 78 | 78 | catch (\UnexpectedValueException $e) { |
| 79 | - $output->writeln('<error>System config ' . implode(' => ', $configNames) . ' could not be deleted because it did not exist</error>'); |
|
| 79 | + $output->writeln('<error>System config '.implode(' => ', $configNames).' could not be deleted because it did not exist</error>'); |
|
| 80 | 80 | return 1; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | $this->systemConfig->setValue($configName, $value); |
| 84 | - $output->writeln('<info>System config value ' . implode(' => ', $configNames) . ' deleted</info>'); |
|
| 84 | + $output->writeln('<info>System config value '.implode(' => ', $configNames).' deleted</info>'); |
|
| 85 | 85 | return 0; |
| 86 | 86 | } else { |
| 87 | 87 | if ($input->hasParameterOption('--error-if-not-exists') && !in_array($configName, $this->systemConfig->getKeys())) { |
| 88 | - $output->writeln('<error>System config ' . $configName . ' could not be deleted because it did not exist</error>'); |
|
| 88 | + $output->writeln('<error>System config '.$configName.' could not be deleted because it did not exist</error>'); |
|
| 89 | 89 | return 1; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | $this->systemConfig->deleteValue($configName); |
| 93 | - $output->writeln('<info>System config value ' . $configName . ' deleted</info>'); |
|
| 93 | + $output->writeln('<info>System config value '.$configName.' deleted</info>'); |
|
| 94 | 94 | return 0; |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $this->systemConfig->setValue($configName, $configValue['value']); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - $output->writeln('<info>System config value ' . implode(' => ', $configNames) . ' set to ' . $configValue['readable-value'] . '</info>'); |
|
| 100 | + $output->writeln('<info>System config value '.implode(' => ', $configNames).' set to '.$configValue['readable-value'].'</info>'); |
|
| 101 | 101 | return 0; |
| 102 | 102 | } |
| 103 | 103 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | return [ |
| 118 | 118 | 'value' => (int) $value, |
| 119 | - 'readable-value' => 'integer ' . (int) $value, |
|
| 119 | + 'readable-value' => 'integer '.(int) $value, |
|
| 120 | 120 | ]; |
| 121 | 121 | |
| 122 | 122 | case 'double': |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | } |
| 127 | 127 | return [ |
| 128 | 128 | 'value' => (double) $value, |
| 129 | - 'readable-value' => 'double ' . (double) $value, |
|
| 129 | + 'readable-value' => 'double '.(double) $value, |
|
| 130 | 130 | ]; |
| 131 | 131 | |
| 132 | 132 | case 'boolean': |
@@ -136,13 +136,13 @@ discard block |
||
| 136 | 136 | case 'true': |
| 137 | 137 | return [ |
| 138 | 138 | 'value' => true, |
| 139 | - 'readable-value' => 'boolean ' . $value, |
|
| 139 | + 'readable-value' => 'boolean '.$value, |
|
| 140 | 140 | ]; |
| 141 | 141 | |
| 142 | 142 | case 'false': |
| 143 | 143 | return [ |
| 144 | 144 | 'value' => false, |
| 145 | - 'readable-value' => 'boolean ' . $value, |
|
| 145 | + 'readable-value' => 'boolean '.$value, |
|
| 146 | 146 | ]; |
| 147 | 147 | |
| 148 | 148 | default: |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | $value = (string) $value; |
| 160 | 160 | return [ |
| 161 | 161 | 'value' => $value, |
| 162 | - 'readable-value' => ($value === '') ? 'empty string' : 'string ' . $value, |
|
| 162 | + 'readable-value' => ($value === '') ? 'empty string' : 'string '.$value, |
|
| 163 | 163 | ]; |
| 164 | 164 | |
| 165 | 165 | default: |
@@ -70,12 +70,12 @@ |
||
| 70 | 70 | $configName = $input->getArgument('name'); |
| 71 | 71 | |
| 72 | 72 | if ($input->hasParameterOption('--error-if-not-exists') && !in_array($configName, $this->config->getAppKeys($appName))) { |
| 73 | - $output->writeln('<error>Config ' . $configName . ' of app ' . $appName . ' could not be deleted because it did not exist</error>'); |
|
| 73 | + $output->writeln('<error>Config '.$configName.' of app '.$appName.' could not be deleted because it did not exist</error>'); |
|
| 74 | 74 | return 1; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | $this->config->deleteAppValue($appName, $configName); |
| 78 | - $output->writeln('<info>Config value ' . $configName . ' of app ' . $appName . ' deleted</info>'); |
|
| 78 | + $output->writeln('<info>Config value '.$configName.' of app '.$appName.' deleted</info>'); |
|
| 79 | 79 | return 0; |
| 80 | 80 | } |
| 81 | 81 | } |
@@ -76,14 +76,14 @@ |
||
| 76 | 76 | $configName = $input->getArgument('name'); |
| 77 | 77 | |
| 78 | 78 | if (!in_array($configName, $this->config->getAppKeys($appName)) && $input->hasParameterOption('--update-only')) { |
| 79 | - $output->writeln('<comment>Config value ' . $configName . ' for app ' . $appName . ' not updated, as it has not been set before.</comment>'); |
|
| 79 | + $output->writeln('<comment>Config value '.$configName.' for app '.$appName.' not updated, as it has not been set before.</comment>'); |
|
| 80 | 80 | return 1; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | $configValue = $input->getOption('value'); |
| 84 | 84 | $this->config->setAppValue($appName, $configName, $configValue); |
| 85 | 85 | |
| 86 | - $output->writeln('<info>Config value ' . $configName . ' for app ' . $appName . ' set to ' . $configValue . '</info>'); |
|
| 86 | + $output->writeln('<info>Config value '.$configName.' for app '.$appName.' set to '.$configValue.'</info>'); |
|
| 87 | 87 | return 0; |
| 88 | 88 | } |
| 89 | 89 | } |