diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-01-12 20:44:38 +0100 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-01-13 00:19:07 +0100 |
commit | 6312c0df6949955d1cd59c3dd444268e0773293c (patch) | |
tree | 1f517db2c7b1c6588a44d13e78b2ff49b2886708 /lib | |
parent | aeecb72e96e54439f98822467bb727366207039f (diff) | |
download | nextcloud-server-6312c0df6949955d1cd59c3dd444268e0773293c.tar.gz nextcloud-server-6312c0df6949955d1cd59c3dd444268e0773293c.zip |
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Accounts/AccountManager.php | 2 | ||||
-rw-r--r-- | lib/private/AppFramework/Http/Dispatcher.php | 4 | ||||
-rw-r--r-- | lib/private/AppFramework/Http/Request.php | 2 | ||||
-rw-r--r-- | lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php | 2 | ||||
-rw-r--r-- | lib/private/BackgroundJob/JobList.php | 4 | ||||
-rw-r--r-- | lib/private/DB/Adapter.php | 2 | ||||
-rw-r--r-- | lib/private/DB/AdapterPgSql.php | 2 | ||||
-rw-r--r-- | lib/private/Files/View.php | 2 | ||||
-rw-r--r-- | lib/private/Mail/Mailer.php | 2 | ||||
-rw-r--r-- | lib/private/Memcache/Memcached.php | 2 | ||||
-rw-r--r-- | lib/private/Migration/BackgroundRepair.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/MarkDown.php | 4 | ||||
-rw-r--r-- | lib/private/Preview/TXT.php | 2 | ||||
-rw-r--r-- | lib/private/Security/TrustedDomainHelper.php | 2 | ||||
-rw-r--r-- | lib/private/Setup/MySQL.php | 2 | ||||
-rw-r--r-- | lib/private/Share/Share.php | 2 | ||||
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 2 | ||||
-rw-r--r-- | lib/private/URLGenerator.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/OC_DB.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/OC_DB_StatementWrapper.php | 2 | ||||
-rw-r--r-- | lib/public/IDBConnection.php | 2 |
21 files changed, 24 insertions, 24 deletions
diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index 2c7641243fa..66137727699 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -630,7 +630,7 @@ class AccountManager implements IAccountManager { } // the value col is limited to 255 bytes. It is used for searches only. - $value = $property['value'] ? Util::shortenMultibyteString($property['value'], 255) : ''; + $value = $property['value'] ? Util::shortenMultibyteString($property['value'], 255) : ''; $query->setParameter('name', $property['name']) ->setParameter('value', $value); diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php index 6bbab42cb79..0f12dbda629 100644 --- a/lib/private/AppFramework/Http/Dispatcher.php +++ b/lib/private/AppFramework/Http/Dispatcher.php @@ -131,7 +131,7 @@ class Dispatcher { $numExecuted = $databaseStatsAfter['executed'] - $databaseStatsBefore['executed']; if ($numBuilt > 50) { - $this->logger->debug('Controller {class}::{method} created {count} QueryBuilder objects, please check if they are created inside a loop by accident.' , [ + $this->logger->debug('Controller {class}::{method} created {count} QueryBuilder objects, please check if they are created inside a loop by accident.', [ 'class' => get_class($controller), 'method' => $methodName, 'count' => $numBuilt, @@ -139,7 +139,7 @@ class Dispatcher { } if ($numExecuted > 100) { - $this->logger->warning('Controller {class}::{method} executed {count} queries.' , [ + $this->logger->warning('Controller {class}::{method} executed {count} queries.', [ 'class' => get_class($controller), 'method' => $methodName, 'count' => $numExecuted, diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index c67500bcaa4..21af2bc46f4 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -303,7 +303,7 @@ class Request implements \ArrayAccess, \Countable, IRequest { * @return string */ public function getHeader(string $name): string { - $name = strtoupper(str_replace('-', '_',$name)); + $name = strtoupper(str_replace('-', '_', $name)); if (isset($this->server['HTTP_' . $name])) { return $this->server['HTTP_' . $name]; } diff --git a/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php b/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php index 8bdbacda20b..5f683fa38ac 100644 --- a/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php +++ b/lib/private/AppFramework/Middleware/Security/RateLimitingMiddleware.php @@ -109,7 +109,7 @@ class RateLimitingMiddleware extends Middleware { */ public function afterException($controller, $methodName, \Exception $exception) { if ($exception instanceof RateLimitExceededException) { - if (stripos($this->request->getHeader('Accept'),'html') === false) { + if (stripos($this->request->getHeader('Accept'), 'html') === false) { $response = new DataResponse([], $exception->getCode()); } else { $response = new TemplateResponse( diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php index 9442bd9eca9..3dbcf518f1e 100644 --- a/lib/private/BackgroundJob/JobList.php +++ b/lib/private/BackgroundJob/JobList.php @@ -356,8 +356,8 @@ class JobList implements IJobList { public function resetBackgroundJob(IJob $job): void { $query = $this->connection->getQueryBuilder(); $query->update('jobs') - ->set('last_run', $query->createNamedParameter(0, IQueryBuilder::PARAM_INT)) - ->set('reserved_at', $query->createNamedParameter(0, IQueryBuilder::PARAM_INT)) + ->set('last_run', $query->createNamedParameter(0, IQueryBuilder::PARAM_INT)) + ->set('reserved_at', $query->createNamedParameter(0, IQueryBuilder::PARAM_INT)) ->where($query->expr()->eq('id', $query->createNamedParameter($job->getId()), IQueryBuilder::PARAM_INT)); $query->executeStatement(); } diff --git a/lib/private/DB/Adapter.php b/lib/private/DB/Adapter.php index 4d9b43d0787..334006d1706 100644 --- a/lib/private/DB/Adapter.php +++ b/lib/private/DB/Adapter.php @@ -136,7 +136,7 @@ class Adapter { /** * @throws \OCP\DB\Exception */ - public function insertIgnoreConflict(string $table,array $values) : int { + public function insertIgnoreConflict(string $table, array $values) : int { try { $builder = $this->conn->getQueryBuilder(); $builder->insert($table); diff --git a/lib/private/DB/AdapterPgSql.php b/lib/private/DB/AdapterPgSql.php index 1262fd4f1ab..9045aa7f879 100644 --- a/lib/private/DB/AdapterPgSql.php +++ b/lib/private/DB/AdapterPgSql.php @@ -43,7 +43,7 @@ class AdapterPgSql extends Adapter { return $statement; } - public function insertIgnoreConflict(string $table,array $values) : int { + public function insertIgnoreConflict(string $table, array $values) : int { if ($this->isPre9_5CompatMode() === true) { return parent::insertIgnoreConflict($table, $values); } diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 72de70a8248..271b7a27321 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1182,7 +1182,7 @@ class View { if ($result && in_array('delete', $hooks) and $result) { $this->removeUpdate($storage, $internalPath); } - if ($result && in_array('write', $hooks, true) && $operation !== 'fopen' && $operation !== 'touch') { + if ($result && in_array('write', $hooks, true) && $operation !== 'fopen' && $operation !== 'touch') { $this->writeUpdate($storage, $internalPath); } if ($result && in_array('touch', $hooks)) { diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php index 1189907eac9..61f506d2676 100644 --- a/lib/private/Mail/Mailer.php +++ b/lib/private/Mail/Mailer.php @@ -244,7 +244,7 @@ class Mailer implements IMailer { } [$name, $domain] = explode('@', $email, 2); - $domain = idn_to_ascii($domain, 0,INTL_IDNA_VARIANT_UTS46); + $domain = idn_to_ascii($domain, 0, INTL_IDNA_VARIANT_UTS46); return $name.'@'.$domain; } diff --git a/lib/private/Memcache/Memcached.php b/lib/private/Memcache/Memcached.php index 87b71223280..50f3fa66ab3 100644 --- a/lib/private/Memcache/Memcached.php +++ b/lib/private/Memcache/Memcached.php @@ -66,7 +66,7 @@ class Memcached extends Cache implements IMemcache { //\Memcached::OPT_BINARY_PROTOCOL => true, ]; // by default enable igbinary serializer if available - /** @psalm-suppress RedundantCondition */ + /** @psalm-suppress RedundantCondition */ if (\Memcached::HAVE_IGBINARY) { $defaultOptions[\Memcached::OPT_SERIALIZER] = \Memcached::SERIALIZER_IGBINARY; diff --git a/lib/private/Migration/BackgroundRepair.php b/lib/private/Migration/BackgroundRepair.php index 25026575d38..03a3d3f4a7c 100644 --- a/lib/private/Migration/BackgroundRepair.php +++ b/lib/private/Migration/BackgroundRepair.php @@ -97,7 +97,7 @@ class BackgroundRepair extends TimedJob { try { $repair->addStep($step); } catch (\Exception $ex) { - $this->logger->logException($ex,[ + $this->logger->logException($ex, [ 'app' => 'migration' ]); diff --git a/lib/private/Preview/MarkDown.php b/lib/private/Preview/MarkDown.php index e24bdb5959b..929f319f57d 100644 --- a/lib/private/Preview/MarkDown.php +++ b/lib/private/Preview/MarkDown.php @@ -43,7 +43,7 @@ class MarkDown extends TXT { return null; } - $content = stream_get_contents($content,3000); + $content = stream_get_contents($content, 3000); //don't create previews of empty text files if (trim($content) === '') { @@ -119,7 +119,7 @@ class MarkDown extends TXT { // Get rid of markdown symbols that we still needed for the font size $line = preg_replace('/^#*\s/', '', $line); - $wrappedText = wordwrap($line, $wordWrap,"\n"); + $wrappedText = wordwrap($line, $wordWrap, "\n"); $linesWrapped = count(explode("\n", $wrappedText)); imagettftext($image, $actualFontSize, 0, $x, $y, $textColor, $actualFontSize === $fontSize ? $fontFile : $fontFileBold, $wrappedText); $nextLineStart = (int)($linesWrapped * ceil($actualFontSize * 2)); diff --git a/lib/private/Preview/TXT.php b/lib/private/Preview/TXT.php index d55d32386a7..bb3af6b90de 100644 --- a/lib/private/Preview/TXT.php +++ b/lib/private/Preview/TXT.php @@ -62,7 +62,7 @@ class TXT extends ProviderV2 { return null; } - $content = stream_get_contents($content,3000); + $content = stream_get_contents($content, 3000); //don't create previews of empty text files if (trim($content) === '') { diff --git a/lib/private/Security/TrustedDomainHelper.php b/lib/private/Security/TrustedDomainHelper.php index 175e4cbd356..0688ebba5b3 100644 --- a/lib/private/Security/TrustedDomainHelper.php +++ b/lib/private/Security/TrustedDomainHelper.php @@ -98,7 +98,7 @@ class TrustedDomainHelper implements ITrustedDomainHelper { return true; } // Reject misformed domains in any case - if (strpos($domain,'-') === 0 || strpos($domain,'..') !== false) { + if (strpos($domain, '-') === 0 || strpos($domain, '..') !== false) { return false; } // Match, allowing for * wildcards diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php index 8a12465fd8d..920baf3e4ee 100644 --- a/lib/private/Setup/MySQL.php +++ b/lib/private/Setup/MySQL.php @@ -125,7 +125,7 @@ class MySQL extends AbstractDatabase { $connection->executeUpdate($query); } } catch (\Exception $ex) { - $this->logger->error('Database user creation failed.',[ + $this->logger->error('Database user creation failed.', [ 'exception' => $ex, 'app' => 'mysql.setup', ]); diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php index 548c8a2c451..47b09982f3a 100644 --- a/lib/private/Share/Share.php +++ b/lib/private/Share/Share.php @@ -847,7 +847,7 @@ class Share extends Constants { * @param array $parameters additional format parameters * @return array format result */ - private static function formatResult($items, $column, $backend, $format = self::FORMAT_NONE , $parameters = null) { + private static function formatResult($items, $column, $backend, $format = self::FORMAT_NONE, $parameters = null) { if ($format === self::FORMAT_NONE) { return $items; } elseif ($format === self::FORMAT_STATUSES) { diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index ec0f25cbae5..6e8d9105a76 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -670,7 +670,7 @@ class DefaultShareProvider implements IShareProvider { ); } - $qb->innerJoin('s', 'filecache' ,'f', $qb->expr()->eq('s.file_source', 'f.fileid')); + $qb->innerJoin('s', 'filecache', 'f', $qb->expr()->eq('s.file_source', 'f.fileid')); $qb->andWhere($qb->expr()->eq('f.parent', $qb->createNamedParameter($node->getId()))); $qb->orderBy('id'); diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php index 382179b23e0..753a4a217d1 100644 --- a/lib/private/URLGenerator.php +++ b/lib/private/URLGenerator.php @@ -187,7 +187,7 @@ class URLGenerator implements IURLGenerator { $theme = \OC_Util::getTheme(); //if a theme has a png but not an svg always use the png - $basename = substr(basename($file),0,-4); + $basename = substr(basename($file), 0, -4); $appPath = \OC_App::getAppPath($appName); diff --git a/lib/private/legacy/OC_DB.php b/lib/private/legacy/OC_DB.php index 1fbc233f535..39faf8e80aa 100644 --- a/lib/private/legacy/OC_DB.php +++ b/lib/private/legacy/OC_DB.php @@ -42,7 +42,7 @@ class OC_DB { * * SQL query via Doctrine prepare(), needs to be execute()'d! */ - public static function prepare($query , $limit = null, $offset = null, $isManipulation = null) { + public static function prepare($query, $limit = null, $offset = null, $isManipulation = null) { $connection = \OC::$server->getDatabaseConnection(); if ($isManipulation === null) { diff --git a/lib/private/legacy/OC_DB_StatementWrapper.php b/lib/private/legacy/OC_DB_StatementWrapper.php index d8e8f0ae37f..d6214a49a33 100644 --- a/lib/private/legacy/OC_DB_StatementWrapper.php +++ b/lib/private/legacy/OC_DB_StatementWrapper.php @@ -59,7 +59,7 @@ class OC_DB_StatementWrapper { /** * pass all other function directly to the \Doctrine\DBAL\Driver\Statement */ - public function __call($name,$arguments) { + public function __call($name, $arguments) { return call_user_func_array([$this->statement,$name], $arguments); } diff --git a/lib/public/IDBConnection.php b/lib/public/IDBConnection.php index 2fa7fa1ad36..d12baa400c0 100644 --- a/lib/public/IDBConnection.php +++ b/lib/public/IDBConnection.php @@ -188,7 +188,7 @@ interface IDBConnection { * @return int number of inserted rows * @since 16.0.0 */ - public function insertIgnoreConflict(string $table,array $values) : int; + public function insertIgnoreConflict(string $table, array $values) : int; /** * Insert or update a row value |