@@ -105,7 +105,7 @@ |
||
105 | 105 | $defaultLogFile = rtrim($dataDir, '/').'/nextcloud.log'; |
106 | 106 | $output->writeln('Log file: '.$this->config->getSystemValue('logfile', $defaultLogFile)); |
107 | 107 | |
108 | - $rotateSize = $this->config->getSystemValue('log_rotate_size', 100*1024*1024); |
|
108 | + $rotateSize = $this->config->getSystemValue('log_rotate_size', 100 * 1024 * 1024); |
|
109 | 109 | if ($rotateSize) { |
110 | 110 | $rotateString = \OCP\Util::humanFileSize($rotateSize); |
111 | 111 | } else { |
@@ -59,10 +59,10 @@ |
||
59 | 59 | if (is_array($value)) { |
60 | 60 | $output->writeln(" <comment>>></comment> $key:"); |
61 | 61 | foreach ($value as $subKey => $subValue) { |
62 | - $output->writeln(" <comment>>></comment> $subKey: " . str_repeat(' ', 46 - strlen($subKey)) . $subValue); |
|
62 | + $output->writeln(" <comment>>></comment> $subKey: ".str_repeat(' ', 46 - strlen($subKey)).$subValue); |
|
63 | 63 | } |
64 | 64 | } else { |
65 | - $output->writeln(" <comment>>></comment> $key: " . str_repeat(' ', 50 - strlen($key)) . $value); |
|
65 | + $output->writeln(" <comment>>></comment> $key: ".str_repeat(' ', 50 - strlen($key)).$value); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | return; |
93 | 93 | } |
94 | 94 | |
95 | - return $this->checkQuota($parent->getPath() . '/' . basename($uri)); |
|
95 | + return $this->checkQuota($parent->getPath().'/'.basename($uri)); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | if ($length) { |
154 | 154 | list($parentPath, $newName) = \Sabre\Uri\split($path); |
155 | - if(is_null($parentPath)) { |
|
155 | + if (is_null($parentPath)) { |
|
156 | 156 | $parentPath = ''; |
157 | 157 | } |
158 | 158 | $req = $this->server->httpRequest; |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | // there is still enough space for the remaining chunks |
164 | 164 | $length -= $chunkHandler->getCurrentSize(); |
165 | 165 | // use target file name for free space check in case of shared files |
166 | - $path = rtrim($parentPath, '/') . '/' . $info['name']; |
|
166 | + $path = rtrim($parentPath, '/').'/'.$info['name']; |
|
167 | 167 | } |
168 | 168 | $freeSpace = $this->getFreeSpace($path); |
169 | 169 | if ($freeSpace >= 0 && $length > $freeSpace) { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | use OCP\Settings\IIconSection; |
31 | 31 | use OCP\Settings\ISettings; |
32 | 32 | |
33 | -trait CommonSettingsTrait { |
|
33 | +trait CommonSettingsTrait { |
|
34 | 34 | /** @var ISettingsManager */ |
35 | 35 | private $settingsManager; |
36 | 36 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | 'admin' => [] |
48 | 48 | ]; |
49 | 49 | |
50 | - if(\OC_User::isAdminUser(\OC_User::getUser())) { |
|
50 | + if (\OC_User::isAdminUser(\OC_User::getUser())) { |
|
51 | 51 | $templateParameters['admin'] = $this->formatAdminSections($currentType, $currentSection); |
52 | 52 | } |
53 | 53 | |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | protected function formatSections($sections, $currentSection, $type, $currentType) { |
60 | 60 | $templateParameters = []; |
61 | 61 | /** @var \OCP\Settings\ISection[] $prioritizedSections */ |
62 | - foreach($sections as $prioritizedSections) { |
|
62 | + foreach ($sections as $prioritizedSections) { |
|
63 | 63 | foreach ($prioritizedSections as $section) { |
64 | - if($type === 'admin') { |
|
64 | + if ($type === 'admin') { |
|
65 | 65 | $settings = $this->settingsManager->getAdminSettings($section->getID()); |
66 | - } else if($type === 'personal') { |
|
66 | + } else if ($type === 'personal') { |
|
67 | 67 | $settings = $this->settingsManager->getPersonalSettings($section->getID()); |
68 | 68 | } |
69 | 69 | if (empty($settings) && !($section->getID() === 'additional' && count(\OC_App::getForms('admin')) > 0)) { |
@@ -80,7 +80,7 @@ |
||
80 | 80 | 'lastcron' => $this->config->getAppValue('core', 'lastcron', false), |
81 | 81 | 'cronErrors' => $this->config->getAppValue('core', 'cronErrors'), |
82 | 82 | 'cli_based_cron_possible' => function_exists('posix_getpwuid'), |
83 | - 'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir . 'config.php'))['name'] : '', |
|
83 | + 'cli_based_cron_user' => function_exists('posix_getpwuid') ? posix_getpwuid(fileowner(\OC::$configDir.'config.php'))['name'] : '', |
|
84 | 84 | ]; |
85 | 85 | |
86 | 86 | return new TemplateResponse('settings', 'settings/admin/server', $parameters, ''); |
@@ -106,7 +106,7 @@ |
||
106 | 106 | $suffix = '…'; |
107 | 107 | } |
108 | 108 | |
109 | - return $prefix . substr($message, $start, $end - $start) . $suffix; |
|
109 | + return $prefix.substr($message, $start, $end - $start).$suffix; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | } |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | ) { |
59 | 59 | $backend = $this->backendService->getBackend($storageOptions['backend']); |
60 | 60 | if (!$backend) { |
61 | - throw new \UnexpectedValueException('Invalid backend ' . $storageOptions['backend']); |
|
61 | + throw new \UnexpectedValueException('Invalid backend '.$storageOptions['backend']); |
|
62 | 62 | } |
63 | 63 | $storageConfig->setBackend($backend); |
64 | 64 | if (isset($storageOptions['authMechanism']) && $storageOptions['authMechanism'] !== 'builtin::builtin') { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $storageOptions['authMechanism'] = 'null'; // to make error handling easier |
69 | 69 | } |
70 | 70 | if (!$authMechanism) { |
71 | - throw new \UnexpectedValueException('Invalid authentication mechanism ' . $storageOptions['authMechanism']); |
|
71 | + throw new \UnexpectedValueException('Invalid authentication mechanism '.$storageOptions['authMechanism']); |
|
72 | 72 | } |
73 | 73 | $storageConfig->setAuthMechanism($authMechanism); |
74 | 74 | $storageConfig->setBackendOptions($storageOptions['options']); |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $parts = explode('/', ltrim($rootMountPath, '/'), 3); |
141 | 141 | if (count($parts) < 3) { |
142 | 142 | // something went wrong, skip |
143 | - \OC::$server->getLogger()->error('Could not parse mount point "' . $rootMountPath . '"', ['app' => 'files_external']); |
|
143 | + \OC::$server->getLogger()->error('Could not parse mount point "'.$rootMountPath.'"', ['app' => 'files_external']); |
|
144 | 144 | continue; |
145 | 145 | } |
146 | 146 | $relativeMountPath = rtrim($parts[2], '/'); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $storageOptions['authMechanism'] = null; // ensure config hash works |
155 | 155 | } |
156 | 156 | if (isset($storageOptions['id'])) { |
157 | - $configId = (int)$storageOptions['id']; |
|
157 | + $configId = (int) $storageOptions['id']; |
|
158 | 158 | if (isset($storages[$configId])) { |
159 | 159 | $currentStorage = $storages[$configId]; |
160 | 160 | } |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | * |
35 | 35 | */ |
36 | 36 | |
37 | -require_once __DIR__ . '/lib/versioncheck.php'; |
|
37 | +require_once __DIR__.'/lib/versioncheck.php'; |
|
38 | 38 | |
39 | 39 | try { |
40 | 40 | |
41 | - require_once __DIR__ . '/lib/base.php'; |
|
41 | + require_once __DIR__.'/lib/base.php'; |
|
42 | 42 | |
43 | 43 | if (\OCP\Util::needUpgrade()) { |
44 | 44 | \OC::$server->getLogger()->debug('Update required, skipping cron', ['app' => 'cron']); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | $appMode = $config->getAppValue('core', 'backgroundjobs_mode', 'ajax'); |
75 | 75 | if ($appMode === 'none') { |
76 | 76 | if (OC::$CLI) { |
77 | - echo 'Background Jobs are disabled!' . PHP_EOL; |
|
77 | + echo 'Background Jobs are disabled!'.PHP_EOL; |
|
78 | 78 | } else { |
79 | 79 | OC_JSON::error(array('data' => array('message' => 'Background jobs disabled!'))); |
80 | 80 | } |
@@ -89,15 +89,15 @@ discard block |
||
89 | 89 | |
90 | 90 | // the cron job must be executed with the right user |
91 | 91 | if (!function_exists('posix_getuid')) { |
92 | - echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL; |
|
92 | + echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php".PHP_EOL; |
|
93 | 93 | exit(1); |
94 | 94 | } |
95 | 95 | $user = posix_getpwuid(posix_getuid()); |
96 | - $configUser = posix_getpwuid(fileowner(OC::$configDir . 'config.php')); |
|
96 | + $configUser = posix_getpwuid(fileowner(OC::$configDir.'config.php')); |
|
97 | 97 | if ($user['name'] !== $configUser['name']) { |
98 | - echo "Console has to be executed with the same user as the web server is operated" . PHP_EOL; |
|
99 | - echo "Current user: " . $user['name'] . PHP_EOL; |
|
100 | - echo "Web server user: " . $configUser['name'] . PHP_EOL; |
|
98 | + echo "Console has to be executed with the same user as the web server is operated".PHP_EOL; |
|
99 | + echo "Current user: ".$user['name'].PHP_EOL; |
|
100 | + echo "Web server user: ".$configUser['name'].PHP_EOL; |
|
101 | 101 | exit(1); |
102 | 102 | } |
103 | 103 |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * |
48 | 48 | * @package OCA\Federation\Controller |
49 | 49 | */ |
50 | -class OCSAuthAPIController extends OCSController{ |
|
50 | +class OCSAuthAPIController extends OCSController { |
|
51 | 51 | |
52 | 52 | /** @var ISecureRandom */ |
53 | 53 | private $secureRandom; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | public function requestSharedSecret($url, $token) { |
145 | 145 | if ($this->trustedServers->isTrustedServer($url) === false) { |
146 | - $this->logger->error('remote server not trusted (' . $url . ') while requesting shared secret', ['app' => 'federation']); |
|
146 | + $this->logger->error('remote server not trusted ('.$url.') while requesting shared secret', ['app' => 'federation']); |
|
147 | 147 | throw new OCSForbiddenException(); |
148 | 148 | } |
149 | 149 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $localToken = $this->dbHandler->getToken($url); |
153 | 153 | if (strcmp($localToken, $token) > 0) { |
154 | 154 | $this->logger->info( |
155 | - 'remote server (' . $url . ') presented lower token. We will initiate the exchange of the shared secret.', |
|
155 | + 'remote server ('.$url.') presented lower token. We will initiate the exchange of the shared secret.', |
|
156 | 156 | ['app' => 'federation'] |
157 | 157 | ); |
158 | 158 | throw new OCSForbiddenException(); |
@@ -184,14 +184,14 @@ discard block |
||
184 | 184 | public function getSharedSecret($url, $token) { |
185 | 185 | |
186 | 186 | if ($this->trustedServers->isTrustedServer($url) === false) { |
187 | - $this->logger->error('remote server not trusted (' . $url . ') while getting shared secret', ['app' => 'federation']); |
|
187 | + $this->logger->error('remote server not trusted ('.$url.') while getting shared secret', ['app' => 'federation']); |
|
188 | 188 | throw new OCSForbiddenException(); |
189 | 189 | } |
190 | 190 | |
191 | 191 | if ($this->isValidToken($url, $token) === false) { |
192 | 192 | $expectedToken = $this->dbHandler->getToken($url); |
193 | 193 | $this->logger->error( |
194 | - 'remote server (' . $url . ') didn\'t send a valid token (got "' . $token . '" but expected "'. $expectedToken . '") while getting shared secret', |
|
194 | + 'remote server ('.$url.') didn\'t send a valid token (got "'.$token.'" but expected "'.$expectedToken.'") while getting shared secret', |
|
195 | 195 | ['app' => 'federation'] |
196 | 196 | ); |
197 | 197 | throw new OCSForbiddenException(); |