From 42625a46be495ea1c60ac8fe8e13946fd9ed9732 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 9 Apr 2020 16:05:56 +0200 Subject: [PATCH] Remove spaces after method or function call Signed-off-by: Christoph Wurst --- .../lib/Controller/RequestHandlerController.php | 2 +- apps/dav/lib/CalDAV/CachedSubscription.php | 2 +- apps/dav/lib/Connector/Sabre/File.php | 2 +- .../SystemTag/SystemTagsObjectMappingCollectionTest.php | 2 +- apps/encryption/lib/Controller/RecoveryController.php | 2 +- apps/encryption/lib/Crypto/EncryptAll.php | 4 ++-- apps/encryption/templates/settings-personal.php | 4 ++-- apps/files/lib/Command/Scan.php | 2 +- core/Command/TwoFactorAuth/State.php | 2 +- core/Controller/SetupController.php | 2 +- lib/base.php | 2 +- lib/private/Config.php | 6 +++--- lib/private/Files/View.php | 2 +- lib/private/legacy/OC_Template.php | 8 ++++---- lib/private/legacy/OC_Util.php | 8 ++++---- 15 files changed, 25 insertions(+), 25 deletions(-) diff --git a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php index d99e6c2d00..3b8b29a49c 100644 --- a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php +++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php @@ -133,7 +133,7 @@ class RequestHandlerController extends Controller { $shareType === null || !is_array($protocol) || !isset($protocol['name']) || - !isset ($protocol['options']) || + !isset($protocol['options']) || !is_array($protocol['options']) || !isset($protocol['options']['sharedSecret']) ) { diff --git a/apps/dav/lib/CalDAV/CachedSubscription.php b/apps/dav/lib/CalDAV/CachedSubscription.php index baba0727f2..093a86dcad 100644 --- a/apps/dav/lib/CalDAV/CachedSubscription.php +++ b/apps/dav/lib/CalDAV/CachedSubscription.php @@ -135,7 +135,7 @@ class CachedSubscription extends \Sabre\CalDAV\Calendar { } $obj['acl'] = $this->getChildACL(); - return new CachedSubscriptionObject ($this->caldavBackend, $this->calendarInfo, $obj); + return new CachedSubscriptionObject($this->caldavBackend, $this->calendarInfo, $obj); } diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 40075f68a7..125935fce5 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -512,7 +512,7 @@ class File extends Node implements IFile { $bytesWritten = $chunk_handler->store($info['index'], $data); //detect aborted upload - if (isset ($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { + if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] === 'PUT') { if (isset($_SERVER['CONTENT_LENGTH'])) { $expected = (int)$_SERVER['CONTENT_LENGTH']; if ($bytesWritten !== $expected) { diff --git a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php index 35a81a03d3..c8482ffe77 100644 --- a/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php +++ b/apps/dav/tests/unit/SystemTag/SystemTagsObjectMappingCollectionTest.php @@ -62,7 +62,7 @@ class SystemTagsObjectMappingCollectionTest extends \Test\TestCase { } public function getNode() { - return new \OCA\DAV\SystemTag\SystemTagsObjectMappingCollection ( + return new \OCA\DAV\SystemTag\SystemTagsObjectMappingCollection( 111, 'files', $this->user, diff --git a/apps/encryption/lib/Controller/RecoveryController.php b/apps/encryption/lib/Controller/RecoveryController.php index 5cc5456844..534e00e1b2 100644 --- a/apps/encryption/lib/Controller/RecoveryController.php +++ b/apps/encryption/lib/Controller/RecoveryController.php @@ -121,7 +121,7 @@ class RecoveryController extends Controller { if (empty($newPassword)) { $errorMessage = (string)$this->l->t('Please provide a new recovery password'); - return new DataResponse (['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST); + return new DataResponse(['data' => ['message' => $errorMessage]], Http::STATUS_BAD_REQUEST); } if (empty($confirmPassword)) { diff --git a/apps/encryption/lib/Crypto/EncryptAll.php b/apps/encryption/lib/Crypto/EncryptAll.php index 5c90631e85..d0aaafd061 100644 --- a/apps/encryption/lib/Crypto/EncryptAll.php +++ b/apps/encryption/lib/Crypto/EncryptAll.php @@ -473,11 +473,11 @@ class EncryptAll { protected function createMailBody($password) { $html = new \OC_Template("encryption", "mail", ""); - $html->assign ('password', $password); + $html->assign('password', $password); $htmlMail = $html->fetchPage(); $plainText = new \OC_Template("encryption", "altmail", ""); - $plainText->assign ('password', $password); + $plainText->assign('password', $password); $plainTextMail = $plainText->fetchPage(); return [$htmlMail, $plainTextMail]; diff --git a/apps/encryption/templates/settings-personal.php b/apps/encryption/templates/settings-personal.php index 41dacc534e..47860b2f20 100644 --- a/apps/encryption/templates/settings-personal.php +++ b/apps/encryption/templates/settings-personal.php @@ -56,7 +56,7 @@ script('encryption', 'settings-personal'); id="userEnableRecoveryCheckbox" name="userEnableRecovery" value="1" - /> + />
@@ -66,7 +66,7 @@ script('encryption', 'settings-personal'); id="userDisableRecoveryCheckbox" name="userEnableRecovery" value="0" - /> + />

diff --git a/apps/files/lib/Command/Scan.php b/apps/files/lib/Command/Scan.php index 38d4b1cc97..f628ed2e0e 100644 --- a/apps/files/lib/Command/Scan.php +++ b/apps/files/lib/Command/Scan.php @@ -173,7 +173,7 @@ class Scan extends Base { $inputPath = $input->getOption('path'); if ($inputPath) { $inputPath = '/' . trim($inputPath, '/'); - list (, $user,) = explode('/', $inputPath, 3); + list(, $user,) = explode('/', $inputPath, 3); $users = [$user]; } else if ($input->getOption('all')) { $users = $this->userManager->search(''); diff --git a/core/Command/TwoFactorAuth/State.php b/core/Command/TwoFactorAuth/State.php index 5f658e3050..3ae1884d34 100644 --- a/core/Command/TwoFactorAuth/State.php +++ b/core/Command/TwoFactorAuth/State.php @@ -62,7 +62,7 @@ class State extends Base { $providerStates = $this->registry->getProviderStates($user); $filtered = $this->filterEnabledDisabledUnknownProviders($providerStates); - list ($enabled, $disabled) = $filtered; + list($enabled, $disabled) = $filtered; if (!empty($enabled)) { $output->writeln("Two-factor authentication is enabled for user $uid"); diff --git a/core/Controller/SetupController.php b/core/Controller/SetupController.php index 7449717831..8205bb4920 100644 --- a/core/Controller/SetupController.php +++ b/core/Controller/SetupController.php @@ -134,7 +134,7 @@ class SetupController { \OCP\Util::writeLog('core', 'Autoconfig file found, setting up Nextcloud…', ILogger::INFO); $AUTOCONFIG = []; include $this->autoConfigFile; - $post = array_merge ($post, $AUTOCONFIG); + $post = array_merge($post, $AUTOCONFIG); } $dbIsSet = isset($post['dbtype']); diff --git a/lib/base.php b/lib/base.php index 6dc5948d53..f287815fa5 100644 --- a/lib/base.php +++ b/lib/base.php @@ -863,7 +863,7 @@ class OC { private static function registerAppRestrictionsHooks() { $groupManager = self::$server->query(\OCP\IGroupManager::class); - $groupManager->listen ('\OC\Group', 'postDelete', function (\OCP\IGroup $group) { + $groupManager->listen('\OC\Group', 'postDelete', function (\OCP\IGroup $group) { $appManager = self::$server->getAppManager(); $apps = $appManager->getEnabledAppsForGroup($group); foreach ($apps as $appId) { diff --git a/lib/private/Config.php b/lib/private/Config.php index d2ddab5069..0c5a9b0320 100644 --- a/lib/private/Config.php +++ b/lib/private/Config.php @@ -239,14 +239,14 @@ class Config { $content .= var_export($this->cache, true); $content .= ";\n"; - touch ($this->configFilePath); + touch($this->configFilePath); $filePointer = fopen($this->configFilePath, 'r+'); // Prevent others not to read the config chmod($this->configFilePath, 0640); // File does not exist, this can happen when doing a fresh install - if(!is_resource ($filePointer)) { + if(!is_resource($filePointer)) { throw new HintException( "Can't write into config directory!", 'This can usually be fixed by giving the webserver write access to the config directory.'); @@ -258,7 +258,7 @@ class Config { } // Write the config and release the lock - ftruncate ($filePointer, 0); + ftruncate($filePointer, 0); fwrite($filePointer, $content); fflush($filePointer); flock($filePointer, LOCK_UN); diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 567af4d23a..881bf1a212 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -670,7 +670,7 @@ class View { list($storage, $internalPath) = $this->resolvePath($path); $target = $storage->fopen($internalPath, 'w'); if ($target) { - list (, $result) = \OC_Helper::streamCopy($data, $target); + list(, $result) = \OC_Helper::streamCopy($data, $target); fclose($target); fclose($data); diff --git a/lib/private/legacy/OC_Template.php b/lib/private/legacy/OC_Template.php index 99ad53fa08..ad1d31d80f 100644 --- a/lib/private/legacy/OC_Template.php +++ b/lib/private/legacy/OC_Template.php @@ -104,16 +104,16 @@ class OC_Template extends \OC\Template\Base { //apps that started before the template initialization can load their own scripts/styles //so to make sure this scripts/styles here are loaded first we use OC_Util::addScript() with $prepend=true //meaning the last script/style in this list will be loaded first - if (\OC::$server->getSystemConfig()->getValue ('installed', false) && $renderAs !== 'error' && !\OCP\Util::needUpgrade()) { - if (\OC::$server->getConfig ()->getAppValue ( 'core', 'backgroundjobs_mode', 'ajax' ) == 'ajax') { - OC_Util::addScript ( 'backgroundjobs', null, true ); + if (\OC::$server->getSystemConfig()->getValue('installed', false) && $renderAs !== 'error' && !\OCP\Util::needUpgrade()) { + if (\OC::$server->getConfig()->getAppValue( 'core', 'backgroundjobs_mode', 'ajax' ) == 'ajax') { + OC_Util::addScript( 'backgroundjobs', null, true ); } } OC_Util::addStyle('css-variables', null, true); OC_Util::addStyle('server', null, true); OC_Util::addTranslations('core', null, true); - if (\OC::$server->getSystemConfig()->getValue ('installed', false)) { + if (\OC::$server->getSystemConfig()->getValue('installed', false)) { OC_Util::addStyle('search', 'results'); OC_Util::addScript('search', 'search', true); OC_Util::addScript('search', 'searchprovider'); diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 5d2f8b8370..378c393831 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -590,7 +590,7 @@ class OC_Util { // core js files need separate handling if ($application !== 'core' && $file !== null) { - self::addTranslations ( $application ); + self::addTranslations( $application ); } self::addExternalResource($application, $prepend, $path, "script"); } @@ -667,7 +667,7 @@ class OC_Util { if ($type === "style") { if (!in_array($path, self::$styles)) { if ($prepend === true) { - array_unshift ( self::$styles, $path ); + array_unshift( self::$styles, $path ); } else { self::$styles[] = $path; } @@ -675,7 +675,7 @@ class OC_Util { } elseif ($type === "script") { if (!in_array($path, self::$scripts)) { if ($prepend === true) { - array_unshift ( self::$scripts, $path ); + array_unshift( self::$scripts, $path ); } else { self::$scripts [] = $path; } @@ -699,7 +699,7 @@ class OC_Util { 'text' => $text ]; if ($prepend === true) { - array_unshift (self::$headers, $header); + array_unshift(self::$headers, $header); } else { self::$headers[] = $header;