@@ -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 | } |
@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | } |
63 | 63 | $languages = $lang; |
64 | 64 | if (empty($lang)) { |
65 | - $languages= $this->getAllLanguages($path); |
|
65 | + $languages = $this->getAllLanguages($path); |
|
66 | 66 | } |
67 | 67 | |
68 | - foreach($languages as $lang) { |
|
68 | + foreach ($languages as $lang) { |
|
69 | 69 | $this->writeFiles($app, $path, $lang, $output); |
70 | 70 | } |
71 | 71 | } |
@@ -73,16 +73,16 @@ discard block |
||
73 | 73 | private function getAllLanguages($path) { |
74 | 74 | $result = array(); |
75 | 75 | foreach (new DirectoryIterator("$path/l10n") as $fileInfo) { |
76 | - if($fileInfo->isDot()) { |
|
76 | + if ($fileInfo->isDot()) { |
|
77 | 77 | continue; |
78 | 78 | } |
79 | - if($fileInfo->isDir()) { |
|
79 | + if ($fileInfo->isDir()) { |
|
80 | 80 | continue; |
81 | 81 | } |
82 | - if($fileInfo->getExtension() !== 'php') { |
|
82 | + if ($fileInfo->getExtension() !== 'php') { |
|
83 | 83 | continue; |
84 | 84 | } |
85 | - $result[]= substr($fileInfo->getBasename(), 0, -4); |
|
85 | + $result[] = substr($fileInfo->getBasename(), 0, -4); |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | return $result; |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | $jsTrans = array(); |
105 | 105 | foreach ($translations as $id => $val) { |
106 | 106 | if (is_array($val)) { |
107 | - $val = '[ ' . join(',', $val) . ']'; |
|
107 | + $val = '[ '.join(',', $val).']'; |
|
108 | 108 | } |
109 | 109 | $jsTrans[] = "\"$id\" : \"$val\""; |
110 | 110 | } |
@@ -78,8 +78,8 @@ discard block |
||
78 | 78 | $this->printErrors($output, $errors); |
79 | 79 | |
80 | 80 | // ignore the OS X setup warning |
81 | - if(count($errors) !== 1 || |
|
82 | - (string)($errors[0]['error']) !== 'Mac OS X is not supported and Nextcloud will not work properly on this platform. Use it at your own risk! ') { |
|
81 | + if (count($errors) !== 1 || |
|
82 | + (string) ($errors[0]['error']) !== 'Mac OS X is not supported and Nextcloud will not work properly on this platform. Use it at your own risk! ') { |
|
83 | 83 | return 1; |
84 | 84 | } |
85 | 85 | } |
@@ -180,10 +180,10 @@ discard block |
||
180 | 180 | protected function printErrors(OutputInterface $output, $errors) { |
181 | 181 | foreach ($errors as $error) { |
182 | 182 | if (is_array($error)) { |
183 | - $output->writeln('<error>' . (string)$error['error'] . '</error>'); |
|
184 | - $output->writeln('<info> -> ' . (string)$error['hint'] . '</info>'); |
|
183 | + $output->writeln('<error>'.(string) $error['error'].'</error>'); |
|
184 | + $output->writeln('<info> -> '.(string) $error['hint'].'</info>'); |
|
185 | 185 | } else { |
186 | - $output->writeln('<error>' . (string)$error . '</error>'); |
|
186 | + $output->writeln('<error>'.(string) $error.'</error>'); |
|
187 | 187 | } |
188 | 188 | } |
189 | 189 | } |
@@ -132,16 +132,16 @@ |
||
132 | 132 | $this->output->writeln(''); |
133 | 133 | break; |
134 | 134 | case '\OC\Repair::step': |
135 | - $this->output->writeln(' - ' . $event->getArgument(0)); |
|
135 | + $this->output->writeln(' - '.$event->getArgument(0)); |
|
136 | 136 | break; |
137 | 137 | case '\OC\Repair::info': |
138 | - $this->output->writeln(' - ' . $event->getArgument(0)); |
|
138 | + $this->output->writeln(' - '.$event->getArgument(0)); |
|
139 | 139 | break; |
140 | 140 | case '\OC\Repair::warning': |
141 | - $this->output->writeln(' - WARNING: ' . $event->getArgument(0)); |
|
141 | + $this->output->writeln(' - WARNING: '.$event->getArgument(0)); |
|
142 | 142 | break; |
143 | 143 | case '\OC\Repair::error': |
144 | - $this->output->writeln(' - ERROR: ' . $event->getArgument(0)); |
|
144 | + $this->output->writeln(' - ERROR: '.$event->getArgument(0)); |
|
145 | 145 | break; |
146 | 146 | } |
147 | 147 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $keys = array_filter(array_keys($aliases), function($k) { |
57 | 57 | return $k[0] === '_'; |
58 | 58 | }); |
59 | - foreach($keys as $key) { |
|
59 | + foreach ($keys as $key) { |
|
60 | 60 | unset($aliases[$key]); |
61 | 61 | } |
62 | 62 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $dir = new \DirectoryIterator(\OC::$SERVERROOT.'/core/img/filetypes'); |
65 | 65 | |
66 | 66 | $files = []; |
67 | - foreach($dir as $fileInfo) { |
|
67 | + foreach ($dir as $fileInfo) { |
|
68 | 68 | if ($fileInfo->isFile()) { |
69 | 69 | $file = preg_replace('/.[^.]*$/', '', $fileInfo->getFilename()); |
70 | 70 | $files[] = $file; |
@@ -78,14 +78,14 @@ discard block |
||
78 | 78 | // Fetch all themes! |
79 | 79 | $themes = []; |
80 | 80 | $dirs = new \DirectoryIterator(\OC::$SERVERROOT.'/themes/'); |
81 | - foreach($dirs as $dir) { |
|
81 | + foreach ($dirs as $dir) { |
|
82 | 82 | //Valid theme dir |
83 | 83 | if ($dir->isFile() || $dir->isDot()) { |
84 | 84 | continue; |
85 | 85 | } |
86 | 86 | |
87 | 87 | $theme = $dir->getFilename(); |
88 | - $themeDir = $dir->getPath() . '/' . $theme . '/core/img/filetypes/'; |
|
88 | + $themeDir = $dir->getPath().'/'.$theme.'/core/img/filetypes/'; |
|
89 | 89 | // Check if this theme has its own filetype icons |
90 | 90 | if (!file_exists($themeDir)) { |
91 | 91 | continue; |
@@ -116,9 +116,9 @@ discard block |
||
116 | 116 | * To regenerate this file run ./occ maintenance:mimetypesjs |
117 | 117 | */ |
118 | 118 | OC.MimeTypeList={ |
119 | - aliases: ' . json_encode($aliases, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . ', |
|
120 | - files: ' . json_encode($files, JSON_PRETTY_PRINT) . ', |
|
121 | - themes: ' . json_encode($themes, JSON_PRETTY_PRINT) . ' |
|
119 | + aliases: ' . json_encode($aliases, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES).', |
|
120 | + files: ' . json_encode($files, JSON_PRETTY_PRINT).', |
|
121 | + themes: ' . json_encode($themes, JSON_PRETTY_PRINT).' |
|
122 | 122 | }; |
123 | 123 | '; |
124 | 124 |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | protected function execute(InputInterface $input, OutputInterface $output) { |
64 | - if ($input->getOption('shipped') === 'true' || $input->getOption('shipped') === 'false'){ |
|
64 | + if ($input->getOption('shipped') === 'true' || $input->getOption('shipped') === 'false') { |
|
65 | 65 | $shippedFilter = $input->getOption('shipped') === 'true'; |
66 | 66 | } else { |
67 | 67 | $shippedFilter = null; |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | //sort enabled apps above disabled apps |
75 | 75 | foreach ($apps as $app) { |
76 | - if ($shippedFilter !== null && \OC_App::isShipped($app) !== $shippedFilter){ |
|
76 | + if ($shippedFilter !== null && \OC_App::isShipped($app) !== $shippedFilter) { |
|
77 | 77 | continue; |
78 | 78 | } |
79 | 79 | if ($this->manager->isInstalled($app)) { |
@@ -41,7 +41,7 @@ |
||
41 | 41 | 'schema-xml', |
42 | 42 | InputArgument::OPTIONAL, |
43 | 43 | 'the schema xml to be used as target schema', |
44 | - \OC::$SERVERROOT . '/db_structure.xml' |
|
44 | + \OC::$SERVERROOT.'/db_structure.xml' |
|
45 | 45 | ) |
46 | 46 | ; |
47 | 47 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | use Symfony\Component\Console\Input\InputInterface; |
29 | 29 | use Symfony\Component\Console\Output\OutputInterface; |
30 | 30 | |
31 | -class ShowKeyStorageRoot extends Command{ |
|
31 | +class ShowKeyStorageRoot extends Command { |
|
32 | 32 | |
33 | 33 | /** @var Util */ |
34 | 34 | protected $util; |
@@ -70,9 +70,9 @@ |
||
70 | 70 | if ($defaultModule === null) { |
71 | 71 | $output->writeln('<error>No default module is set</error>'); |
72 | 72 | } else if (!isset($modules[$defaultModule])) { |
73 | - $output->writeln('<error>The current default module does not exist: ' . $defaultModule . '</error>'); |
|
73 | + $output->writeln('<error>The current default module does not exist: '.$defaultModule.'</error>'); |
|
74 | 74 | } else { |
75 | - $output->writeln('Default module: ' . $defaultModule); |
|
75 | + $output->writeln('Default module: '.$defaultModule); |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | } |