summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2020-04-09 20:39:37 +0200
committerGitHub <noreply@github.com>2020-04-09 20:39:37 +0200
commit008e6d7e849a82fdc3aa20169c4c8bdd0fe506be (patch)
tree6abbe3d8741de956ad787b5e3d55cec85ceb558f /lib
parent64510932b8bd7d4d1d490f7da7fb9ebcf21e31c2 (diff)
parent3a415e4139d6e28c16b0420ab411e6df5ff6d54a (diff)
downloadnextcloud-server-008e6d7e849a82fdc3aa20169c4c8bdd0fe506be.tar.gz
nextcloud-server-008e6d7e849a82fdc3aa20169c4c8bdd0fe506be.zip
Merge pull request #20391 from nextcloud/refactor/spaces-cleanup
Remove all extra whitespace PSR2 does not like
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php4
-rw-r--r--lib/private/AppFramework/Http.php8
-rw-r--r--lib/private/AppFramework/Http/Request.php6
-rw-r--r--lib/private/Avatar/Avatar.php2
-rw-r--r--lib/private/Collaboration/Collaborators/RemotePlugin.php2
-rw-r--r--lib/private/Color.php4
-rw-r--r--lib/private/Config.php6
-rw-r--r--lib/private/ContactsManager.php4
-rw-r--r--lib/private/DB/AdapterPgSql.php4
-rw-r--r--lib/private/DB/AdapterSqlite.php6
-rw-r--r--lib/private/DB/Connection.php2
-rw-r--r--lib/private/DateTimeZone.php2
-rw-r--r--lib/private/Encryption/Util.php2
-rw-r--r--lib/private/Files/ObjectStore/HomeObjectStoreStorage.php2
-rw-r--r--lib/private/Files/View.php2
-rw-r--r--lib/private/Group/Database.php4
-rw-r--r--lib/private/Installer.php14
-rw-r--r--lib/private/L10N/Factory.php12
-rw-r--r--lib/private/Mail/Mailer.php1
-rw-r--r--lib/private/Search.php4
-rw-r--r--lib/private/Search/Result/Audio.php2
-rw-r--r--lib/private/Search/Result/File.php6
-rw-r--r--lib/private/Search/Result/Folder.php2
-rw-r--r--lib/private/Search/Result/Image.php2
-rw-r--r--lib/private/Share/Share.php6
-rw-r--r--lib/private/Tags.php6
-rw-r--r--lib/private/Template/Base.php8
-rw-r--r--lib/private/TemplateLayout.php24
-rw-r--r--lib/private/URLGenerator.php2
-rw-r--r--lib/private/User/Backend.php2
-rw-r--r--lib/private/User/Session.php2
-rw-r--r--lib/private/User/User.php2
-rw-r--r--lib/private/legacy/OC_DB.php6
-rw-r--r--lib/private/legacy/OC_Hook.php12
-rw-r--r--lib/private/legacy/OC_JSON.php12
-rw-r--r--lib/private/legacy/OC_Response.php6
-rw-r--r--lib/private/legacy/OC_Template.php36
-rw-r--r--lib/private/legacy/OC_Util.php12
-rw-r--r--lib/private/legacy/template/functions.php6
-rw-r--r--lib/public/App.php8
-rw-r--r--lib/public/AppFramework/Db/Mapper.php2
-rw-r--r--lib/public/AppFramework/Db/QBMapper.php2
-rw-r--r--lib/public/Authentication/TwoFactorAuth/IRegistry.php2
-rw-r--r--lib/public/Contacts/IManager.php6
-rw-r--r--lib/public/Diagnostics/IQueryLogger.php16
-rw-r--r--lib/public/DirectEditing/IManager.php1
-rw-r--r--lib/public/Files.php6
-rw-r--r--lib/public/LDAP/ILDAPProvider.php2
-rw-r--r--lib/public/Search/Result.php2
-rw-r--r--lib/public/Security/ISecureRandom.php2
-rw-r--r--lib/public/Util.php4
51 files changed, 149 insertions, 149 deletions
diff --git a/lib/base.php b/lib/base.php
index 6dc5948d53c..a86dccd0822 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -265,7 +265,7 @@ class OC {
$l->t('Cannot write into "config" directory!'),
$l->t('This can usually be fixed by giving the webserver write access to the config directory.') . '. '
. $l->t('Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See %s',
- [ $urlGenerator->linkToDocs('admin-config') ] ),
+ [ $urlGenerator->linkToDocs('admin-config') ]),
503
);
}
@@ -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/AppFramework/Http.php b/lib/private/AppFramework/Http.php
index 91d13b9e231..4b08812b6cf 100644
--- a/lib/private/AppFramework/Http.php
+++ b/lib/private/AppFramework/Http.php
@@ -117,7 +117,7 @@ class Http extends BaseHttp {
* @param string $ETag the etag
* @return string
*/
- public function getStatusHeader($status, \DateTime $lastModified=null,
+ public function getStatusHeader($status, \DateTime $lastModified=null,
$ETag=null) {
if(!is_null($lastModified)) {
@@ -131,7 +131,7 @@ class Http extends BaseHttp {
||
(isset($this->server['HTTP_IF_MODIFIED_SINCE'])
- && trim($this->server['HTTP_IF_MODIFIED_SINCE']) ===
+ && trim($this->server['HTTP_IF_MODIFIED_SINCE']) ===
$lastModified)) {
$status = self::STATUS_NOT_MODIFIED;
@@ -140,13 +140,13 @@ class Http extends BaseHttp {
// we have one change currently for the http 1.0 header that differs
// from 1.1: STATUS_TEMPORARY_REDIRECT should be STATUS_FOUND
// if this differs any more, we want to create childclasses for this
- if($status === self::STATUS_TEMPORARY_REDIRECT
+ if($status === self::STATUS_TEMPORARY_REDIRECT
&& $this->protocolVersion === 'HTTP/1.0') {
$status = self::STATUS_FOUND;
}
- return $this->protocolVersion . ' ' . $status . ' ' .
+ return $this->protocolVersion . ' ' . $status . ' ' .
$this->headers[$status];
}
diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php
index 41bfbd82506..9b8c0690ba6 100644
--- a/lib/private/AppFramework/Http/Request.php
+++ b/lib/private/AppFramework/Http/Request.php
@@ -327,8 +327,8 @@ class Request implements \ArrayAccess, \Countable, IRequest {
// There's a few headers that seem to end up in the top-level
// server array.
switch ($name) {
- case 'CONTENT_TYPE' :
- case 'CONTENT_LENGTH' :
+ case 'CONTENT_TYPE':
+ case 'CONTENT_LENGTH':
case 'REMOTE_ADDR':
if (isset($this->server[$name])) {
return $this->server[$name];
@@ -811,7 +811,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
$encoding = mb_detect_encoding($pathInfo, ['UTF-8', 'ISO-8859-1']);
switch($encoding) {
- case 'ISO-8859-1' :
+ case 'ISO-8859-1':
$pathInfo = utf8_encode($pathInfo);
}
// end copy
diff --git a/lib/private/Avatar/Avatar.php b/lib/private/Avatar/Avatar.php
index a097db286f2..4badc8c43f5 100644
--- a/lib/private/Avatar/Avatar.php
+++ b/lib/private/Avatar/Avatar.php
@@ -300,7 +300,7 @@ abstract class Avatar implements IAvatar {
$hash = strtolower($hash);
// Already a md5 hash?
- if( preg_match('/^([0-9a-f]{4}-?){8}$/', $hash, $matches) !== 1 ) {
+ if(preg_match('/^([0-9a-f]{4}-?){8}$/', $hash, $matches) !== 1) {
$hash = md5($hash);
}
diff --git a/lib/private/Collaboration/Collaborators/RemotePlugin.php b/lib/private/Collaboration/Collaborators/RemotePlugin.php
index b41e6441f84..6309b8e6eab 100644
--- a/lib/private/Collaboration/Collaborators/RemotePlugin.php
+++ b/lib/private/Collaboration/Collaborators/RemotePlugin.php
@@ -96,7 +96,7 @@ class RemotePlugin implements ISearchPlugin {
/**
* Add local share if remote cloud id matches a local user ones
*/
- if ($localUser !== null && $remoteUser !== $this->userId && $cloudId === $localUser->getCloudId() ) {
+ if ($localUser !== null && $remoteUser !== $this->userId && $cloudId === $localUser->getCloudId()) {
$result['wide'][] = [
'label' => $contact['FN'],
'uuid' => $contact['UID'],
diff --git a/lib/private/Color.php b/lib/private/Color.php
index 11f2c4ada46..6238831c41b 100644
--- a/lib/private/Color.php
+++ b/lib/private/Color.php
@@ -24,7 +24,9 @@
namespace OC;
class Color {
- public $r, $g, $b;
+ public $r;
+ public $g;
+ public $b;
public function __construct($r, $g, $b) {
$this->r = $r;
$this->g = $g;
diff --git a/lib/private/Config.php b/lib/private/Config.php
index d2ddab5069a..0c5a9b0320d 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/ContactsManager.php b/lib/private/ContactsManager.php
index 6f37ed0fc2c..6ccedca77b9 100644
--- a/lib/private/ContactsManager.php
+++ b/lib/private/ContactsManager.php
@@ -125,7 +125,7 @@ namespace OC {
/**
* Return a list of the user's addressbooks display names
* ! The addressBook displayName are not unique, please use getUserAddressBooks
- *
+ *
* @return array
* @since 6.0.0
* @deprecated 16.0.0 - Use `$this->getUserAddressBooks()` instead
@@ -142,7 +142,7 @@ namespace OC {
/**
* Return a list of the user's addressbooks
- *
+ *
* @return IAddressBook[]
* @since 16.0.0
*/
diff --git a/lib/private/DB/AdapterPgSql.php b/lib/private/DB/AdapterPgSql.php
index 0febdd7f1f8..dd9c7dc9680 100644
--- a/lib/private/DB/AdapterPgSql.php
+++ b/lib/private/DB/AdapterPgSql.php
@@ -35,8 +35,8 @@ class AdapterPgSql extends Adapter {
const UNIX_TIMESTAMP_REPLACEMENT = 'cast(extract(epoch from current_timestamp) as integer)';
public function fixupStatement($statement) {
- $statement = str_replace( '`', '"', $statement );
- $statement = str_ireplace( 'UNIX_TIMESTAMP()', self::UNIX_TIMESTAMP_REPLACEMENT, $statement );
+ $statement = str_replace('`', '"', $statement);
+ $statement = str_ireplace('UNIX_TIMESTAMP()', self::UNIX_TIMESTAMP_REPLACEMENT, $statement);
return $statement;
}
diff --git a/lib/private/DB/AdapterSqlite.php b/lib/private/DB/AdapterSqlite.php
index 20d27732131..2d8715e90f5 100644
--- a/lib/private/DB/AdapterSqlite.php
+++ b/lib/private/DB/AdapterSqlite.php
@@ -43,10 +43,10 @@ class AdapterSqlite extends Adapter {
public function fixupStatement($statement) {
$statement = preg_replace('/`(\w+)` ILIKE \?/', 'LOWER($1) LIKE LOWER(?)', $statement);
- $statement = str_replace( '`', '"', $statement );
- $statement = str_ireplace( 'NOW()', 'datetime(\'now\')', $statement );
+ $statement = str_replace('`', '"', $statement);
+ $statement = str_ireplace('NOW()', 'datetime(\'now\')', $statement);
$statement = str_ireplace('GREATEST(', 'MAX(', $statement);
- $statement = str_ireplace( 'UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement );
+ $statement = str_ireplace('UNIX_TIMESTAMP()', 'strftime(\'%s\',\'now\')', $statement);
return $statement;
}
diff --git a/lib/private/DB/Connection.php b/lib/private/DB/Connection.php
index bfca8d4ec7b..a0c0ac18481 100644
--- a/lib/private/DB/Connection.php
+++ b/lib/private/DB/Connection.php
@@ -395,7 +395,7 @@ class Connection extends ReconnectWrapper implements IDBConnection {
* @return string
*/
protected function replaceTablePrefix($statement) {
- return str_replace( '*PREFIX*', $this->tablePrefix, $statement );
+ return str_replace('*PREFIX*', $this->tablePrefix, $statement);
}
/**
diff --git a/lib/private/DateTimeZone.php b/lib/private/DateTimeZone.php
index d12dbdf2a37..971a1a97334 100644
--- a/lib/private/DateTimeZone.php
+++ b/lib/private/DateTimeZone.php
@@ -119,7 +119,7 @@ class DateTimeZone implements IDateTimeZone {
* Get the default timezone of the server
*
* Falls back to UTC if it is not yet set.
- *
+ *
* @return string
*/
protected function getDefaultTimeZone() {
diff --git a/lib/private/Encryption/Util.php b/lib/private/Encryption/Util.php
index 9010f81dc40..937a77bca7a 100644
--- a/lib/private/Encryption/Util.php
+++ b/lib/private/Encryption/Util.php
@@ -253,7 +253,7 @@ class Util {
public function stripPartialFileExtension($path) {
$extension = pathinfo($path, PATHINFO_EXTENSION);
- if ( $extension === 'part') {
+ if ($extension === 'part') {
$newLength = strlen($path) - 5; // 5 = strlen(".part")
$fPath = substr($path, 0, $newLength);
diff --git a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php
index 0632caedc6e..98b99efcb5a 100644
--- a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php
@@ -34,7 +34,7 @@ class HomeObjectStoreStorage extends ObjectStoreStorage implements \OCP\Files\IH
* @param array $params
*/
public function __construct($params) {
- if ( ! isset($params['user']) || ! $params['user'] instanceof User) {
+ if (! isset($params['user']) || ! $params['user'] instanceof User) {
throw new \Exception('missing user object in parameters');
}
$this->user = $params['user'];
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 567af4d23ab..881bf1a2126 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/Group/Database.php b/lib/private/Group/Database.php
index ba023d64acb..99654b5d1f2 100644
--- a/lib/private/Group/Database.php
+++ b/lib/private/Group/Database.php
@@ -194,7 +194,7 @@ class Database extends ABackend
$this->fixDI();
// No duplicate entries!
- if( !$this->inGroup( $uid, $gid )) {
+ if(!$this->inGroup($uid, $gid)) {
$qb = $this->dbConn->getQueryBuilder();
$qb->insert('group_user')
->setValue('uid', $qb->createNamedParameter($uid))
@@ -250,7 +250,7 @@ class Database extends ABackend
->execute();
$groups = [];
- while( $row = $cursor->fetch()) {
+ while($row = $cursor->fetch()) {
$groups[] = $row['gid'];
$this->groupCache[$row['gid']] = $row['gid'];
}
diff --git a/lib/private/Installer.php b/lib/private/Installer.php
index b3919f22d03..78925a56a2e 100644
--- a/lib/private/Installer.php
+++ b/lib/private/Installer.php
@@ -479,7 +479,7 @@ class Installer {
* this has to be done by the function oc_app_uninstall().
*/
public function removeApp($appId) {
- if($this->isDownloaded( $appId )) {
+ if($this->isDownloaded($appId)) {
if (\OC::$server->getAppManager()->isShipped($appId)) {
return false;
}
@@ -528,10 +528,10 @@ class Installer {
$config = \OC::$server->getConfig();
$errors = [];
foreach(\OC::$APPSROOTS as $app_dir) {
- if($dir = opendir( $app_dir['path'] )) {
- while( false !== ( $filename = readdir( $dir ))) {
- if( $filename[0] !== '.' and is_dir($app_dir['path']."/$filename") ) {
- if( file_exists( $app_dir['path']."/$filename/appinfo/info.xml" )) {
+ if($dir = opendir($app_dir['path'])) {
+ while(false !== ($filename = readdir($dir))) {
+ if($filename[0] !== '.' and is_dir($app_dir['path']."/$filename")) {
+ if(file_exists($app_dir['path']."/$filename/appinfo/info.xml")) {
if($config->getAppValue($filename, "installed_version", null) === null) {
$info=OC_App::getAppInfo($filename);
$enabled = isset($info['default_enable']);
@@ -556,7 +556,7 @@ class Installer {
}
}
}
- closedir( $dir );
+ closedir($dir);
}
}
@@ -623,7 +623,7 @@ class Installer {
* @param string $script
*/
private static function includeAppScript($script) {
- if ( file_exists($script) ){
+ if (file_exists($script)){
include $script;
}
}
diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php
index 2902136e62e..5624155dadd 100644
--- a/lib/private/L10N/Factory.php
+++ b/lib/private/L10N/Factory.php
@@ -526,10 +526,10 @@ class Factory implements IFactory {
return $this->pluralFunctions[$string];
}
- if (preg_match( '/^\s*nplurals\s*=\s*(\d+)\s*;\s*plural=(.*)$/u', $string, $matches)) {
+ if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s*plural=(.*)$/u', $string, $matches)) {
// sanitize
- $nplurals = preg_replace( '/[^0-9]/', '', $matches[1] );
- $plural = preg_replace( '#[^n0-9:\(\)\?\|\&=!<>+*/\%-]#', '', $matches[2] );
+ $nplurals = preg_replace('/[^0-9]/', '', $matches[1]);
+ $plural = preg_replace('#[^n0-9:\(\)\?\|\&=!<>+*/\%-]#', '', $matches[2]);
$body = str_replace(
[ 'plural', 'n', '$n$plurals', ],
@@ -545,7 +545,7 @@ class Factory implements IFactory {
$length = strlen($body);
for($i = 0; $i < $length; $i++) {
$ch = $body[$i];
- switch ( $ch ) {
+ switch ($ch) {
case '?':
$res .= ' ? (';
$p++;
@@ -554,7 +554,7 @@ class Factory implements IFactory {
$res .= ') : (';
break;
case ';':
- $res .= str_repeat( ')', $p ) . ';';
+ $res .= str_repeat(')', $p) . ';';
$p = 0;
break;
default:
@@ -627,7 +627,7 @@ class Factory implements IFactory {
ksort($commonLanguages);
// sort now by displayed language not the iso-code
- usort( $languages, function ($a, $b) {
+ usort($languages, function ($a, $b) {
if ($a['code'] === $a['name'] && $b['code'] !== $b['name']) {
// If a doesn't have a name, but b does, list b before a
return 1;
diff --git a/lib/private/Mail/Mailer.php b/lib/private/Mail/Mailer.php
index f8af68faad3..c07556b6a62 100644
--- a/lib/private/Mail/Mailer.php
+++ b/lib/private/Mail/Mailer.php
@@ -47,7 +47,6 @@ use OCP\Mail\IMailer;
use OCP\Mail\IMessage;
use OCP\Mail\Events\BeforeMessageSent;
-
/**
* Class Mailer provides some basic functions to create a mail message that can be used in combination with
* \OC\Mail\Message.
diff --git a/lib/private/Search.php b/lib/private/Search.php
index 598eda82a54..42a925f90d9 100644
--- a/lib/private/Search.php
+++ b/lib/private/Search.php
@@ -53,7 +53,7 @@ class Search implements ISearch {
$results = [];
foreach($this->providers as $provider) {
/** @var $provider Provider */
- if ( ! $provider->providesResultsFor($inApps) ) {
+ if (! $provider->providesResultsFor($inApps)) {
continue;
}
if ($provider instanceof PagedProvider) {
@@ -109,7 +109,7 @@ class Search implements ISearch {
* Create instances of all the registered search providers
*/
private function initProviders() {
- if( ! empty($this->providers) ) {
+ if(! empty($this->providers)) {
return;
}
foreach($this->registeredProviders as $provider) {
diff --git a/lib/private/Search/Result/Audio.php b/lib/private/Search/Result/Audio.php
index a035f51b38b..67a6add04bf 100644
--- a/lib/private/Search/Result/Audio.php
+++ b/lib/private/Search/Result/Audio.php
@@ -31,7 +31,7 @@ class Audio extends File {
/**
* Type name; translated in templates
- * @var string
+ * @var string
*/
public $type = 'audio';
diff --git a/lib/private/Search/Result/File.php b/lib/private/Search/Result/File.php
index 0b7e11f2fcb..cd605c49821 100644
--- a/lib/private/Search/Result/File.php
+++ b/lib/private/Search/Result/File.php
@@ -35,7 +35,7 @@ class File extends \OCP\Search\Result {
/**
* Type name; translated in templates
- * @var string
+ * @var string
*/
public $type = 'file';
@@ -47,7 +47,7 @@ class File extends \OCP\Search\Result {
/**
* Size, in bytes
- * @var int
+ * @var int
*/
public $size;
@@ -65,7 +65,7 @@ class File extends \OCP\Search\Result {
/**
* File permissions:
- *
+ *
* @var string
*/
public $permissions;
diff --git a/lib/private/Search/Result/Folder.php b/lib/private/Search/Result/Folder.php
index 1626f9d67d2..0a746221ee0 100644
--- a/lib/private/Search/Result/Folder.php
+++ b/lib/private/Search/Result/Folder.php
@@ -31,7 +31,7 @@ class Folder extends File {
/**
* Type name; translated in templates
- * @var string
+ * @var string
*/
public $type = 'folder';
diff --git a/lib/private/Search/Result/Image.php b/lib/private/Search/Result/Image.php
index 02973855efb..21123a4de13 100644
--- a/lib/private/Search/Result/Image.php
+++ b/lib/private/Search/Result/Image.php
@@ -31,7 +31,7 @@ class Image extends File {
/**
* Type name; translated in templates
- * @var string
+ * @var string
*/
public $type = 'image';
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php
index 5fcb38de008..9b74239d69d 100644
--- a/lib/private/Share/Share.php
+++ b/lib/private/Share/Share.php
@@ -854,7 +854,7 @@ class Share extends Constants {
}
// Add display names to result
$row['share_with_displayname'] = $row['share_with'];
- if ( isset($row['share_with']) && $row['share_with'] != '' &&
+ if (isset($row['share_with']) && $row['share_with'] != '' &&
$row['share_type'] === self::SHARE_TYPE_USER) {
$shareWithUser = \OC::$server->getUserManager()->get($row['share_with']);
$row['share_with_displayname'] = $shareWithUser === null ? $row['share_with'] : $shareWithUser->getDisplayName();
@@ -869,7 +869,7 @@ class Share extends Constants {
}
}
}
- if ( isset($row['uid_owner']) && $row['uid_owner'] != '') {
+ if (isset($row['uid_owner']) && $row['uid_owner'] != '') {
$ownerUser = \OC::$server->getUserManager()->get($row['uid_owner']);
$row['displayname_owner'] = $ownerUser === null ? $row['uid_owner'] : $ownerUser->getDisplayName();
}
@@ -1018,7 +1018,7 @@ class Share extends Constants {
// for file/folder shares we need to compare file_source, otherwise we compare item_source
// only group shares if they already point to the same target, otherwise the file where shared
// before grouping of shares was added. In this case we don't group them toi avoid confusions
- if (( $fileSharing && $item['file_source'] === $r['file_source'] && $item['file_target'] === $r['file_target']) ||
+ if (($fileSharing && $item['file_source'] === $r['file_source'] && $item['file_target'] === $r['file_target']) ||
(!$fileSharing && $item['item_source'] === $r['item_source'] && $item['item_target'] === $r['item_target'])) {
// add the first item to the list of grouped shares
if (!isset($result[$key]['grouped'])) {
diff --git a/lib/private/Tags.php b/lib/private/Tags.php
index 20a80672a52..4d05beb259c 100644
--- a/lib/private/Tags.php
+++ b/lib/private/Tags.php
@@ -306,7 +306,7 @@ class Tags implements ITags {
}
if(!is_null($result)) {
- while( $row = $result->fetchRow()) {
+ while($row = $result->fetchRow()) {
$id = (int)$row['objid'];
if ($this->includeShared) {
@@ -452,7 +452,7 @@ class Tags implements ITags {
if(!$this->hasTag($name) && $name !== '') {
$newones[] = new Tag($this->user, $this->type, $name);
}
- if(!is_null($id) ) {
+ if(!is_null($id)) {
// Insert $objectid, $categoryid pairs if not exist.
self::$relations[] = ['objid' => $id, 'tag' => $name];
}
@@ -550,7 +550,7 @@ class Tags implements ITags {
try {
$stmt = \OC_DB::prepare('DELETE FROM `' . self::RELATION_TABLE . '` '
. 'WHERE `categoryid` = ?');
- while( $row = $result->fetchRow()) {
+ while($row = $result->fetchRow()) {
try {
$stmt->execute([$row['id']]);
} catch(\Exception $e) {
diff --git a/lib/private/Template/Base.php b/lib/private/Template/Base.php
index ddbe58b6d9d..d07cf2249f7 100644
--- a/lib/private/Template/Base.php
+++ b/lib/private/Template/Base.php
@@ -65,7 +65,7 @@ class Base {
*/
protected function getAppTemplateDirs($theme, $app, $serverRoot, $app_dir) {
// Check if the app is in the app folder or in the root
- if( file_exists($app_dir.'/templates/' )) {
+ if(file_exists($app_dir.'/templates/')) {
return [
$serverRoot.'/themes/'.$theme.'/apps/'.$app.'/templates/',
$app_dir.'/templates/',
@@ -115,7 +115,7 @@ class Base {
* $_[$key][$position] in the template.
*/
public function append($key, $value) {
- if( array_key_exists( $key, $this->vars )) {
+ if(array_key_exists($key, $this->vars)) {
$this->vars[$key][] = $value;
}
else{
@@ -131,7 +131,7 @@ class Base {
*/
public function printPage() {
$data = $this->fetchPage();
- if( $data === false ) {
+ if($data === false) {
return false;
}
else{
@@ -168,7 +168,7 @@ class Base {
$theme = $this->theme;
if(!is_null($additionalParams)) {
- $_ = array_merge( $additionalParams, $this->vars );
+ $_ = array_merge($additionalParams, $this->vars);
foreach ($_ as $var => $value) {
${$var} = $value;
}
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php
index 3ed0b86a269..968ae7fceb8 100644
--- a/lib/private/TemplateLayout.php
+++ b/lib/private/TemplateLayout.php
@@ -75,7 +75,7 @@ class TemplateLayout extends \OC_Template {
// Decide which page we show
if($renderAs === 'user') {
- parent::__construct( 'core', 'layout.user' );
+ parent::__construct('core', 'layout.user');
if(in_array(\OC_App::getCurrentApp(), ['settings','admin', 'help']) !== false) {
$this->assign('bodyid', 'body-settings');
}else{
@@ -83,22 +83,22 @@ class TemplateLayout extends \OC_Template {
}
// Add navigation entry
- $this->assign( 'application', '');
- $this->assign( 'appid', $appId );
+ $this->assign('application', '');
+ $this->assign('appid', $appId);
$navigation = \OC::$server->getNavigationManager()->getAll();
- $this->assign( 'navigation', $navigation);
+ $this->assign('navigation', $navigation);
$settingsNavigation = \OC::$server->getNavigationManager()->getAll('settings');
- $this->assign( 'settingsnavigation', $settingsNavigation);
+ $this->assign('settingsnavigation', $settingsNavigation);
foreach($navigation as $entry) {
if ($entry['active']) {
- $this->assign( 'application', $entry['name'] );
+ $this->assign('application', $entry['name']);
break;
}
}
foreach($settingsNavigation as $entry) {
if ($entry['active']) {
- $this->assign( 'application', $entry['name'] );
+ $this->assign('application', $entry['name']);
break;
}
}
@@ -139,7 +139,7 @@ class TemplateLayout extends \OC_Template {
$this->assign('user_uid', \OC_User::getUser());
} else if ($renderAs === 'public') {
parent::__construct('core', 'layout.public');
- $this->assign( 'appid', $appId );
+ $this->assign('appid', $appId);
$this->assign('bodyid', 'body-public');
/** @var IRegistry $subscription */
@@ -196,7 +196,7 @@ class TemplateLayout extends \OC_Template {
foreach($jsFiles as $info) {
$web = $info[1];
$file = $info[2];
- $this->append( 'jsfiles', $web.'/'.$file . $this->getVersionHashSuffix() );
+ $this->append('jsfiles', $web.'/'.$file . $this->getVersionHashSuffix());
}
try {
@@ -229,14 +229,14 @@ class TemplateLayout extends \OC_Template {
$file = $info[2];
if (substr($file, -strlen('print.css')) === 'print.css') {
- $this->append( 'printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix() );
+ $this->append('printcssfiles', $web.'/'.$file . $this->getVersionHashSuffix());
} else {
$suffix = $this->getVersionHashSuffix($web, $file);
if (strpos($file, '?v=') == false) {
- $this->append( 'cssfiles', $web.'/'.$file . $suffix);
+ $this->append('cssfiles', $web.'/'.$file . $suffix);
} else {
- $this->append( 'cssfiles', $web.'/'.$file . '-' . substr($suffix, 3));
+ $this->append('cssfiles', $web.'/'.$file . '-' . substr($suffix, 3));
}
}
diff --git a/lib/private/URLGenerator.php b/lib/private/URLGenerator.php
index 62eafaafedb..c0896ec3516 100644
--- a/lib/private/URLGenerator.php
+++ b/lib/private/URLGenerator.php
@@ -122,7 +122,7 @@ class URLGenerator implements IURLGenerator {
public function linkTo(string $app, string $file, array $args = []): string {
$frontControllerActive = ($this->config->getSystemValue('htaccess.IgnoreFrontController', false) === true || getenv('front_controller_active') === 'true');
- if( $app !== '' ) {
+ if($app !== '') {
$app_path = \OC_App::getAppPath($app);
// Check if the app is in the app folder
if ($app_path && file_exists($app_path . '/' . $file)) {
diff --git a/lib/private/User/Backend.php b/lib/private/User/Backend.php
index 53c5a55a2e3..e90cfdc2e3d 100644
--- a/lib/private/User/Backend.php
+++ b/lib/private/User/Backend.php
@@ -150,7 +150,7 @@ abstract class Backend implements UserInterface {
public function getDisplayNames($search = '', $limit = null, $offset = null) {
$displayNames = [];
$users = $this->getUsers($search, $limit, $offset);
- foreach ( $users as $user) {
+ foreach ($users as $user) {
$displayNames[$user] = $user;
}
return $displayNames;
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index ca0c7263f7b..7b129a393e3 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -459,7 +459,7 @@ class Session implements IUserSession, Emitter {
}
// Try to login with this username and password
- if (!$this->login($user, $password) ) {
+ if (!$this->login($user, $password)) {
// Failed, maybe the user used their email address
$users = $this->manager->getByEmail($user);
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index 0f17af3063e..bc492a6df29 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -449,7 +449,7 @@ class User implements IUser {
public function getCloudId() {
$uid = $this->getUID();
$server = $this->urlGenerator->getAbsoluteURL('/');
- $server = rtrim( $this->removeProtocolFromUrl($server), '/');
+ $server = rtrim($this->removeProtocolFromUrl($server), '/');
return \OC::$server->getCloudIdManager()->getCloudId($uid, $server)->getId();
}
diff --git a/lib/private/legacy/OC_DB.php b/lib/private/legacy/OC_DB.php
index edcac8f9071..cf45faae314 100644
--- a/lib/private/legacy/OC_DB.php
+++ b/lib/private/legacy/OC_DB.php
@@ -126,14 +126,14 @@ class OC_DB {
}
if (is_array($stmt)) {
// convert to prepared statement
- if ( ! array_key_exists('sql', $stmt) ) {
+ if (! array_key_exists('sql', $stmt)) {
$message = 'statement array must at least contain key \'sql\'';
throw new \OC\DatabaseException($message);
}
- if ( ! array_key_exists('limit', $stmt) ) {
+ if (! array_key_exists('limit', $stmt)) {
$stmt['limit'] = null;
}
- if ( ! array_key_exists('limit', $stmt) ) {
+ if (! array_key_exists('limit', $stmt)) {
$stmt['offset'] = null;
}
$stmt = self::prepare($stmt['sql'], $stmt['limit'], $stmt['offset']);
diff --git a/lib/private/legacy/OC_Hook.php b/lib/private/legacy/OC_Hook.php
index d7b1e414a00..b98424711dd 100644
--- a/lib/private/legacy/OC_Hook.php
+++ b/lib/private/legacy/OC_Hook.php
@@ -54,12 +54,12 @@ class OC_Hook {
static public function connect($signalClass, $signalName, $slotClass, $slotName) {
// If we're trying to connect to an emitting class that isn't
// yet registered, register it
- if( !array_key_exists($signalClass, self::$registered )) {
+ if(!array_key_exists($signalClass, self::$registered)) {
self::$registered[$signalClass] = [];
}
// If we're trying to connect to an emitting method that isn't
// yet registered, register it with the emitting class
- if( !array_key_exists( $signalName, self::$registered[$signalClass] )) {
+ if(!array_key_exists($signalName, self::$registered[$signalClass])) {
self::$registered[$signalClass][$signalName] = [];
}
@@ -95,20 +95,20 @@ class OC_Hook {
// Return false if no hook handlers are listening to this
// emitting class
- if( !array_key_exists($signalClass, self::$registered )) {
+ if(!array_key_exists($signalClass, self::$registered)) {
return false;
}
// Return false if no hook handlers are listening to this
// emitting method
- if( !array_key_exists( $signalName, self::$registered[$signalClass] )) {
+ if(!array_key_exists($signalName, self::$registered[$signalClass])) {
return false;
}
// Call all slots
- foreach( self::$registered[$signalClass][$signalName] as $i ) {
+ foreach(self::$registered[$signalClass][$signalName] as $i) {
try {
- call_user_func( [ $i["class"], $i["name"] ], $params );
+ call_user_func([ $i["class"], $i["name"] ], $params);
} catch (Exception $e){
self::$thrownExceptions[] = $e;
\OC::$server->getLogger()->logException($e);
diff --git a/lib/private/legacy/OC_JSON.php b/lib/private/legacy/OC_JSON.php
index f83fca0a433..5b4b97e6fd0 100644
--- a/lib/private/legacy/OC_JSON.php
+++ b/lib/private/legacy/OC_JSON.php
@@ -42,7 +42,7 @@ class OC_JSON{
* @suppress PhanDeprecatedFunction
*/
public static function checkAppEnabled($app) {
- if( !\OC::$server->getAppManager()->isEnabledForUser($app)) {
+ if(!\OC::$server->getAppManager()->isEnabledForUser($app)) {
$l = \OC::$server->getL10N('lib');
self::error([ 'data' => [ 'message' => $l->t('Application is not enabled'), 'error' => 'application_not_enabled' ]]);
exit();
@@ -56,7 +56,7 @@ class OC_JSON{
*/
public static function checkLoggedIn() {
$twoFactorAuthManger = \OC::$server->getTwoFactorAuthManager();
- if( !\OC::$server->getUserSession()->isLoggedIn()
+ if(!\OC::$server->getUserSession()->isLoggedIn()
|| $twoFactorAuthManger->needsSecondFactor(\OC::$server->getUserSession()->getUser())) {
$l = \OC::$server->getL10N('lib');
http_response_code(\OCP\AppFramework\Http::STATUS_UNAUTHORIZED);
@@ -76,7 +76,7 @@ class OC_JSON{
exit();
}
- if( !\OC::$server->getRequest()->passesCSRFCheck()) {
+ if(!\OC::$server->getRequest()->passesCSRFCheck()) {
$l = \OC::$server->getL10N('lib');
self::error([ 'data' => [ 'message' => $l->t('Token expired. Please reload page.'), 'error' => 'token_expired' ]]);
exit();
@@ -89,7 +89,7 @@ class OC_JSON{
* @suppress PhanDeprecatedFunction
*/
public static function checkAdminUser() {
- if( !OC_User::isAdminUser(OC_User::getUser())) {
+ if(!OC_User::isAdminUser(OC_User::getUser())) {
$l = \OC::$server->getL10N('lib');
self::error([ 'data' => [ 'message' => $l->t('Authentication error'), 'error' => 'authentication_error' ]]);
exit();
@@ -103,7 +103,7 @@ class OC_JSON{
*/
public static function error($data = []) {
$data['status'] = 'error';
- header( 'Content-Type: application/json; charset=utf-8');
+ header('Content-Type: application/json; charset=utf-8');
echo self::encode($data);
}
@@ -114,7 +114,7 @@ class OC_JSON{
*/
public static function success($data = []) {
$data['status'] = 'success';
- header( 'Content-Type: application/json; charset=utf-8');
+ header('Content-Type: application/json; charset=utf-8');
echo self::encode($data);
}
diff --git a/lib/private/legacy/OC_Response.php b/lib/private/legacy/OC_Response.php
index d30f56ca1ba..45fea27d61d 100644
--- a/lib/private/legacy/OC_Response.php
+++ b/lib/private/legacy/OC_Response.php
@@ -40,10 +40,10 @@ class OC_Response {
\OC\AppFramework\Http\Request::USER_AGENT_ANDROID_MOBILE_CHROME,
\OC\AppFramework\Http\Request::USER_AGENT_FREEBOX,
])) {
- header( 'Content-Disposition: ' . rawurlencode($type) . '; filename="' . rawurlencode( $filename ) . '"' );
+ header('Content-Disposition: ' . rawurlencode($type) . '; filename="' . rawurlencode($filename) . '"');
} else {
- header( 'Content-Disposition: ' . rawurlencode($type) . '; filename*=UTF-8\'\'' . rawurlencode( $filename )
- . '; filename="' . rawurlencode( $filename ) . '"' );
+ header('Content-Disposition: ' . rawurlencode($type) . '; filename*=UTF-8\'\'' . rawurlencode($filename)
+ . '; filename="' . rawurlencode($filename) . '"');
}
}
diff --git a/lib/private/legacy/OC_Template.php b/lib/private/legacy/OC_Template.php
index 99ad53fa08a..08f23b55a0f 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');
@@ -146,12 +146,12 @@ class OC_Template extends \OC\Template\Base {
*/
protected function findTemplate($theme, $app, $name) {
// Check if it is a app template or not.
- if( $app !== '' ) {
+ if($app !== '') {
$dirs = $this->getAppTemplateDirs($theme, $app, OC::$SERVERROOT, OC_App::getAppPath($app));
} else {
$dirs = $this->getCoreTemplateDirs($theme, OC::$SERVERROOT);
}
- $locator = new \OC\Template\TemplateFileLocator( $dirs );
+ $locator = new \OC\Template\TemplateFileLocator($dirs);
$template = $locator->find($name);
$path = $locator->getPath();
return [$path, $template];
@@ -182,7 +182,7 @@ class OC_Template extends \OC\Template\Base {
public function fetchPage($additionalParams = null) {
$data = parent::fetchPage($additionalParams);
- if( $this->renderAs ) {
+ if($this->renderAs) {
$page = new TemplateLayout($this->renderAs, $this->app);
if(is_array($additionalParams)) {
@@ -195,7 +195,7 @@ class OC_Template extends \OC\Template\Base {
$headers = '';
foreach(OC_Util::$headers as $header) {
$headers .= '<'.\OCP\Util::sanitizeHTML($header['tag']);
- if ( strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes']))) ) {
+ if (strcasecmp($header['tag'], 'script') === 0 && in_array('src', array_map('strtolower', array_keys($header['attributes'])))) {
$headers .= ' defer';
}
foreach($header['attributes'] as $name=>$value) {
@@ -239,9 +239,9 @@ class OC_Template extends \OC\Template\Base {
* @return boolean|null
*/
public static function printUserPage($application, $name, $parameters = []) {
- $content = new OC_Template( $application, $name, "user" );
- foreach( $parameters as $key => $value ) {
- $content->assign( $key, $value );
+ $content = new OC_Template($application, $name, "user");
+ foreach($parameters as $key => $value) {
+ $content->assign($key, $value);
}
print $content->printPage();
}
@@ -254,9 +254,9 @@ class OC_Template extends \OC\Template\Base {
* @return bool
*/
public static function printAdminPage($application, $name, $parameters = []) {
- $content = new OC_Template( $application, $name, "admin" );
- foreach( $parameters as $key => $value ) {
- $content->assign( $key, $value );
+ $content = new OC_Template($application, $name, "admin");
+ foreach($parameters as $key => $value) {
+ $content->assign($key, $value);
}
return $content->printPage();
}
@@ -270,8 +270,8 @@ class OC_Template extends \OC\Template\Base {
*/
public static function printGuestPage($application, $name, $parameters = []) {
$content = new OC_Template($application, $name, $name === 'error' ? $name : 'guest');
- foreach( $parameters as $key => $value ) {
- $content->assign( $key, $value );
+ foreach($parameters as $key => $value) {
+ $content->assign($key, $value);
}
return $content->printPage();
}
@@ -296,9 +296,9 @@ class OC_Template extends \OC\Template\Base {
http_response_code($statusCode);
try {
- $content = new \OC_Template( '', 'error', 'error', false );
+ $content = new \OC_Template('', 'error', 'error', false);
$errors = [['error' => $error_msg, 'hint' => $hint]];
- $content->assign( 'errors', $errors );
+ $content->assign('errors', $errors);
$content->printPage();
} catch (\Exception $e) {
$logger = \OC::$server->getLogger();
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index 5d2f8b8370e..4d7d00f5dc2 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;
@@ -757,7 +757,7 @@ class OC_Util {
'hint' => $l->t('This can usually be fixed by giving the webserver write access to the config directory. See %s',
[ $urlGenerator->linkToDocs('admin-dir_permissions') ]) . '. '
. $l->t('Or, if you prefer to keep config.php file read only, set the option "config_is_read_only" to true in it. See %s',
- [ $urlGenerator->linkToDocs('admin-config') ] )
+ [ $urlGenerator->linkToDocs('admin-config') ])
];
}
}
@@ -925,7 +925,7 @@ class OC_Util {
}
if(function_exists('xml_parser_create') &&
- LIBXML_LOADED_VERSION < 20700 ) {
+ LIBXML_LOADED_VERSION < 20700) {
$version = LIBXML_LOADED_VERSION;
$major = floor($version/10000);
$version -= ($major * 10000);
diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php
index f427642b619..e42ef796f0f 100644
--- a/lib/private/legacy/template/functions.php
+++ b/lib/private/legacy/template/functions.php
@@ -235,7 +235,7 @@ function link_to_docs($key) {
* For further information have a look at \OCP\IURLGenerator::imagePath
*/
function image_path($app, $image) {
- return \OC::$server->getURLGenerator()->imagePath( $app, $image );
+ return \OC::$server->getURLGenerator()->imagePath($app, $image);
}
/**
@@ -244,7 +244,7 @@ function image_path($app, $image) {
* @return string link to the image
*/
function mimetype_icon($mimetype) {
- return \OC::$server->getMimeTypeDetector()->mimeTypeIcon( $mimetype );
+ return \OC::$server->getMimeTypeDetector()->mimeTypeIcon($mimetype);
}
/**
@@ -274,7 +274,7 @@ function publicPreview_icon($path, $token) {
* For further information have a look at OC_Helper::humanFileSize
*/
function human_file_size($bytes) {
- return OC_Helper::humanFileSize( $bytes );
+ return OC_Helper::humanFileSize($bytes);
}
/**
diff --git a/lib/public/App.php b/lib/public/App.php
index 7d55729c473..8e4a983c6bf 100644
--- a/lib/public/App.php
+++ b/lib/public/App.php
@@ -57,7 +57,7 @@ class App {
* @deprecated 14.0.0 Use settings section in appinfo.xml to register personal admin sections
*/
public static function registerPersonal($app, $page) {
- \OC_App::registerPersonal( $app, $page );
+ \OC_App::registerPersonal($app, $page);
}
/**
@@ -69,7 +69,7 @@ class App {
* @deprecated 14.0.0 Use settings section in appinfo.xml to register admin sections
*/
public static function registerAdmin($app, $page) {
- \OC_App::registerAdmin( $app, $page );
+ \OC_App::registerAdmin($app, $page);
}
/**
@@ -81,7 +81,7 @@ class App {
* @since 4.0.0
*/
public static function getAppInfo($app, $path=false) {
- return \OC_App::getAppInfo( $app, $path);
+ return \OC_App::getAppInfo($app, $path);
}
/**
@@ -94,7 +94,7 @@ class App {
* @deprecated 13.0.0 use \OC::$server->getAppManager()->isEnabledForUser($appId)
*/
public static function isEnabled($app) {
- return \OC::$server->getAppManager()->isEnabledForUser( $app );
+ return \OC::$server->getAppManager()->isEnabledForUser($app);
}
/**
diff --git a/lib/public/AppFramework/Db/Mapper.php b/lib/public/AppFramework/Db/Mapper.php
index 6d35c99d672..289ac1d684d 100644
--- a/lib/public/AppFramework/Db/Mapper.php
+++ b/lib/public/AppFramework/Db/Mapper.php
@@ -285,7 +285,7 @@ abstract class Mapper {
$row2 = $stmt->fetch();
$stmt->closeCursor();
//MDB2 returns null, PDO and doctrine false when no row is available
- if( ! ($row2 === false || $row2 === null )) {
+ if(! ($row2 === false || $row2 === null)) {
$msg = $this->buildDebugMessage(
'Did not expect more than one result when executing', $sql, $params, $limit, $offset
);
diff --git a/lib/public/AppFramework/Db/QBMapper.php b/lib/public/AppFramework/Db/QBMapper.php
index d26fb090725..c7b4b877651 100644
--- a/lib/public/AppFramework/Db/QBMapper.php
+++ b/lib/public/AppFramework/Db/QBMapper.php
@@ -261,7 +261,7 @@ abstract class QBMapper {
$row2 = $cursor->fetch();
$cursor->closeCursor();
- if($row2 !== false ) {
+ if($row2 !== false) {
$msg = $this->buildDebugMessage(
'Did not expect more than one result when executing', $query
);
diff --git a/lib/public/Authentication/TwoFactorAuth/IRegistry.php b/lib/public/Authentication/TwoFactorAuth/IRegistry.php
index 9c10e86b5f8..70026ca1dad 100644
--- a/lib/public/Authentication/TwoFactorAuth/IRegistry.php
+++ b/lib/public/Authentication/TwoFactorAuth/IRegistry.php
@@ -31,7 +31,7 @@ use OCP\IUser;
/**
* Nextcloud 2FA provider registry for stateful 2FA providers
- *
+ *
* This service keeps track of which providers are currently active for a specific
* user. Stateful 2FA providers (IStatefulProvider) must use this service to save
* their enabled/disabled state.
diff --git a/lib/public/Contacts/IManager.php b/lib/public/Contacts/IManager.php
index 45baa127eee..dcb4c7ddbb3 100644
--- a/lib/public/Contacts/IManager.php
+++ b/lib/public/Contacts/IManager.php
@@ -160,7 +160,7 @@ interface IManager {
/**
* Return a list of the user's addressbooks display names
- *
+ *
* @return array
* @since 6.0.0
* @deprecated 16.0.0 - Use `$this->getUserAddressBooks()` instead
@@ -169,7 +169,7 @@ interface IManager {
/**
* Return a list of the user's addressbooks
- *
+ *
* @return IAddressBook[]
* @since 16.0.0
*/
@@ -177,7 +177,7 @@ interface IManager {
/**
* removes all registered address book instances
- *
+ *
* @return void
* @since 6.0.0
*/
diff --git a/lib/public/Diagnostics/IQueryLogger.php b/lib/public/Diagnostics/IQueryLogger.php
index 14628c5688f..5a5656a6bca 100644
--- a/lib/public/Diagnostics/IQueryLogger.php
+++ b/lib/public/Diagnostics/IQueryLogger.php
@@ -35,10 +35,10 @@ use Doctrine\DBAL\Logging\SQLLogger;
*/
interface IQueryLogger extends SQLLogger {
/**
- * Mark the start of a query providing query SQL statement, its parameters and types.
- * This method should be called as close to the DB as possible and after
- * query is finished finalized with stopQuery() method.
- *
+ * Mark the start of a query providing query SQL statement, its parameters and types.
+ * This method should be called as close to the DB as possible and after
+ * query is finished finalized with stopQuery() method.
+ *
* @param string $sql
* @param array|null $params
* @param array|null $types
@@ -49,7 +49,7 @@ interface IQueryLogger extends SQLLogger {
/**
* Mark the end of the current active query. Ending query should store \OCP\Diagnostics\IQuery to
* be returned with getQueries() method.
- *
+ *
* @return mixed
* @since 8.0.0
*/
@@ -58,7 +58,7 @@ interface IQueryLogger extends SQLLogger {
/**
* This method should return all \OCP\Diagnostics\IQuery objects stored using
* startQuery()/stopQuery() methods.
- *
+ *
* @return \OCP\Diagnostics\IQuery[]
* @since 8.0.0
*/
@@ -67,8 +67,8 @@ interface IQueryLogger extends SQLLogger {
/**
* Activate the module for the duration of the request. Deactivated module
* does not create and store \OCP\Diagnostics\IQuery objects.
- * Only activated module should create and store objects to be
- * returned with getQueries() call.
+ * Only activated module should create and store objects to be
+ * returned with getQueries() call.
*
* @since 12.0.0
*/
diff --git a/lib/public/DirectEditing/IManager.php b/lib/public/DirectEditing/IManager.php
index 33d4716fc60..e9548a91e7a 100644
--- a/lib/public/DirectEditing/IManager.php
+++ b/lib/public/DirectEditing/IManager.php
@@ -87,4 +87,3 @@ interface IManager {
public function cleanup(): int;
}
-
diff --git a/lib/public/Files.php b/lib/public/Files.php
index adadbcd7aba..a1ff8a6d5a9 100644
--- a/lib/public/Files.php
+++ b/lib/public/Files.php
@@ -55,7 +55,7 @@ class Files {
* @deprecated 14.0.0
*/
static public function rmdirr($dir) {
- return \OC_Helper::rmdirr( $dir );
+ return \OC_Helper::rmdirr($dir);
}
/**
@@ -90,7 +90,7 @@ class Files {
* @deprecated 14.0.0
*/
public static function streamCopy($source, $target) {
- list($count, ) = \OC_Helper::streamCopy( $source, $target );
+ list($count, ) = \OC_Helper::streamCopy($source, $target);
return $count;
}
@@ -115,6 +115,6 @@ class Files {
* @deprecated 14.0.0 use IAppData instead
*/
public static function getStorage($app) {
- return \OC_App::getStorage( $app );
+ return \OC_App::getStorage($app);
}
}
diff --git a/lib/public/LDAP/ILDAPProvider.php b/lib/public/LDAP/ILDAPProvider.php
index 25127987eef..491906e5556 100644
--- a/lib/public/LDAP/ILDAPProvider.php
+++ b/lib/public/LDAP/ILDAPProvider.php
@@ -76,7 +76,7 @@ interface ILDAPProvider {
public function sanitizeDN($dn);
/**
- * Return a new LDAP connection resource for the specified user.
+ * Return a new LDAP connection resource for the specified user.
* @param string $uid user id
* @return resource of the LDAP connection
* @since 11.0.0
diff --git a/lib/public/Search/Result.php b/lib/public/Search/Result.php
index 0cbeb114af6..8d9a4e5d237 100644
--- a/lib/public/Search/Result.php
+++ b/lib/public/Search/Result.php
@@ -56,7 +56,7 @@ class Result {
/**
* The type of search result returned; for consistency, name this the same
- * as the class name (e.g. \OC\Search\File -> 'file') in lowercase.
+ * as the class name (e.g. \OC\Search\File -> 'file') in lowercase.
* @var string
* @since 7.0.0
*/
diff --git a/lib/public/Security/ISecureRandom.php b/lib/public/Security/ISecureRandom.php
index c2d149feaf8..3fbc6c8ee10 100644
--- a/lib/public/Security/ISecureRandom.php
+++ b/lib/public/Security/ISecureRandom.php
@@ -51,7 +51,7 @@ interface ISecureRandom {
/**
* Characters that can be used for <code>generate($length, $characters)</code>, to
- * generate human readable random strings. Lower- and upper-case characters and digits
+ * generate human readable random strings. Lower- and upper-case characters and digits
* are included. Characters which are ambiguous are excluded, such as I, l, and 1 and so on.
*/
const CHAR_HUMAN_READABLE = 'abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789';
diff --git a/lib/public/Util.php b/lib/public/Util.php
index 99161dfd72c..4427e39b24b 100644
--- a/lib/public/Util.php
+++ b/lib/public/Util.php
@@ -171,7 +171,7 @@ class Util {
* @since 4.0.0
*/
public static function addStyle($application, $file = null) {
- \OC_Util::addStyle( $application, $file );
+ \OC_Util::addStyle($application, $file);
}
/**
@@ -181,7 +181,7 @@ class Util {
* @since 4.0.0
*/
public static function addScript($application, $file = null) {
- \OC_Util::addScript( $application, $file );
+ \OC_Util::addScript($application, $file);
}
/**