@@ -60,12 +60,12 @@ discard block |
||
60 | 60 | $post['dbpass'] = $post['dbpassword']; |
61 | 61 | } |
62 | 62 | |
63 | - if(isset($post['install']) AND $post['install']=='true') { |
|
63 | + if (isset($post['install']) AND $post['install'] == 'true') { |
|
64 | 64 | // We have to launch the installation process : |
65 | 65 | $e = $this->setupHelper->install($post); |
66 | 66 | $errors = array('errors' => $e); |
67 | 67 | |
68 | - if(count($e) > 0) { |
|
68 | + if (count($e) > 0) { |
|
69 | 69 | $options = array_merge($opts, $post, $errors); |
70 | 70 | $this->display($options); |
71 | 71 | } else { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | public function finishSetup() { |
100 | - if( file_exists( $this->autoConfigFile )) { |
|
100 | + if (file_exists($this->autoConfigFile)) { |
|
101 | 101 | unlink($this->autoConfigFile); |
102 | 102 | } |
103 | 103 | \OC::$server->getIntegrityCodeChecker()->runInstanceVerification(); |
@@ -105,11 +105,11 @@ discard block |
||
105 | 105 | } |
106 | 106 | |
107 | 107 | public function loadAutoConfig($post) { |
108 | - if( file_exists($this->autoConfigFile)) { |
|
108 | + if (file_exists($this->autoConfigFile)) { |
|
109 | 109 | \OCP\Util::writeLog('core', 'Autoconfig file found, setting up ownCloud…', \OCP\Util::INFO); |
110 | 110 | $AUTOCONFIG = array(); |
111 | 111 | include $this->autoConfigFile; |
112 | - $post = array_merge ($post, $AUTOCONFIG); |
|
112 | + $post = array_merge($post, $AUTOCONFIG); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | $dbIsSet = isset($post['dbtype']); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | protected function execute(InputInterface $input, OutputInterface $output) { |
56 | 56 | $outputType = $input->getOption('output'); |
57 | 57 | if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { |
58 | - $certificates = array_map(function (ICertificate $certificate) { |
|
58 | + $certificates = array_map(function(ICertificate $certificate) { |
|
59 | 59 | return [ |
60 | 60 | 'name' => $certificate->getName(), |
61 | 61 | 'common_name' => $certificate->getCommonName(), |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | 'Issued By' |
82 | 82 | ]); |
83 | 83 | |
84 | - $rows = array_map(function (ICertificate $certificate) { |
|
84 | + $rows = array_map(function(ICertificate $certificate) { |
|
85 | 85 | return [ |
86 | 86 | $certificate->getName(), |
87 | 87 | $certificate->getCommonName(), |
@@ -56,20 +56,20 @@ |
||
56 | 56 | |
57 | 57 | protected function execute(InputInterface $input, OutputInterface $output) { |
58 | 58 | $user = $this->userManager->get($input->getArgument('uid')); |
59 | - if(is_null($user)) { |
|
59 | + if (is_null($user)) { |
|
60 | 60 | $output->writeln('<error>User does not exist</error>'); |
61 | 61 | return; |
62 | 62 | } |
63 | 63 | |
64 | 64 | $lastLogin = $user->getLastLogin(); |
65 | - if($lastLogin === 0) { |
|
66 | - $output->writeln('User ' . $user->getUID() . |
|
65 | + if ($lastLogin === 0) { |
|
66 | + $output->writeln('User '.$user->getUID(). |
|
67 | 67 | ' has never logged in, yet.'); |
68 | 68 | } else { |
69 | 69 | $date = new \DateTime(); |
70 | 70 | $date->setTimestamp($lastLogin); |
71 | - $output->writeln($user->getUID() . |
|
72 | - '`s last login: ' . $date->format('d.m.Y H:i')); |
|
71 | + $output->writeln($user->getUID(). |
|
72 | + '`s last login: '.$date->format('d.m.Y H:i')); |
|
73 | 73 | } |
74 | 74 | } |
75 | 75 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | protected function execute(InputInterface $input, OutputInterface $output) { |
72 | - $users = $this->userManager->search('', (int)$input->getOption('limit'), (int)$input->getOption('offset')); |
|
72 | + $users = $this->userManager->search('', (int) $input->getOption('limit'), (int) $input->getOption('offset')); |
|
73 | 73 | $this->writeArrayInOutputFormat($input, $output, $this->formatUsers($users)); |
74 | 74 | } |
75 | 75 | |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | * @return array |
79 | 79 | */ |
80 | 80 | private function formatUsers(array $users) { |
81 | - $keys = array_map(function (IUser $user) { |
|
81 | + $keys = array_map(function(IUser $user) { |
|
82 | 82 | return $user->getUID(); |
83 | 83 | }, $users); |
84 | - $values = array_map(function (IUser $user) { |
|
84 | + $values = array_map(function(IUser $user) { |
|
85 | 85 | return $user->getDisplayName(); |
86 | 86 | }, $users); |
87 | 87 | return array_combine($keys, $values); |
@@ -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 | } |
@@ -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 | } |
@@ -72,19 +72,19 @@ |
||
72 | 72 | default: |
73 | 73 | foreach ($items as $key => $item) { |
74 | 74 | if (is_array($item)) { |
75 | - $output->writeln($prefix . $key . ':'); |
|
76 | - $this->writeArrayInOutputFormat($input, $output, $item, ' ' . $prefix); |
|
75 | + $output->writeln($prefix.$key.':'); |
|
76 | + $this->writeArrayInOutputFormat($input, $output, $item, ' '.$prefix); |
|
77 | 77 | continue; |
78 | 78 | } |
79 | 79 | if (!is_int($key)) { |
80 | 80 | $value = $this->valueToString($item); |
81 | 81 | if (!is_null($value)) { |
82 | - $output->writeln($prefix . $key . ': ' . $value); |
|
82 | + $output->writeln($prefix.$key.': '.$value); |
|
83 | 83 | } else { |
84 | - $output->writeln($prefix . $key); |
|
84 | + $output->writeln($prefix.$key); |
|
85 | 85 | } |
86 | 86 | } else { |
87 | - $output->writeln($prefix . $this->valueToString($item)); |
|
87 | + $output->writeln($prefix.$this->valueToString($item)); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | break; |
@@ -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: |