aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 09:22:29 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 10:16:08 +0200
commit2fbad1ed72bc9ef591a6f35558eb02e7b76ffd1b (patch)
treea3da09ffec08d6c8abc3bf0fabb7f8c8a1c830f6 /lib/private
parent1575bd838f2e938b18b04bcdcc28e2fc24d95c45 (diff)
downloadnextcloud-server-2fbad1ed72bc9ef591a6f35558eb02e7b76ffd1b.tar.gz
nextcloud-server-2fbad1ed72bc9ef591a6f35558eb02e7b76ffd1b.zip
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/AppFramework/Http.php2
-rw-r--r--lib/private/AppFramework/Middleware/OCSMiddleware.php2
-rw-r--r--lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php2
-rw-r--r--lib/private/Authentication/TwoFactorAuth/Manager.php4
-rw-r--r--lib/private/Comments/Comment.php8
-rw-r--r--lib/private/DB/MySQLMigrator.php38
-rw-r--r--lib/private/Group/Database.php16
-rw-r--r--lib/private/Group/MetaData.php14
-rw-r--r--lib/private/IntegrityCheck/Checker.php24
-rw-r--r--lib/private/Preview/Generator.php6
-rw-r--r--lib/private/Security/TrustedDomainHelper.php8
-rw-r--r--lib/private/Share/Share.php2
-rw-r--r--lib/private/Share20/DefaultShareProvider.php6
-rw-r--r--lib/private/Share20/Manager.php2
-rw-r--r--lib/private/SubAdmin.php2
-rw-r--r--lib/private/Tagging/Tag.php12
-rw-r--r--lib/private/Tags.php2
-rw-r--r--lib/private/User/Database.php14
-rw-r--r--lib/private/legacy/OC_Defaults.php2
-rw-r--r--lib/private/legacy/OC_Files.php44
-rw-r--r--lib/private/legacy/OC_Hook.php4
21 files changed, 107 insertions, 107 deletions
diff --git a/lib/private/AppFramework/Http.php b/lib/private/AppFramework/Http.php
index 56503ce9595..91d13b9e231 100644
--- a/lib/private/AppFramework/Http.php
+++ b/lib/private/AppFramework/Http.php
@@ -118,7 +118,7 @@ class Http extends BaseHttp {
* @return string
*/
public function getStatusHeader($status, \DateTime $lastModified=null,
- $ETag=null) {
+ $ETag=null) {
if(!is_null($lastModified)) {
$lastModified = $lastModified->format(\DateTime::RFC2822);
diff --git a/lib/private/AppFramework/Middleware/OCSMiddleware.php b/lib/private/AppFramework/Middleware/OCSMiddleware.php
index d52163246c7..fe0f58c1ab5 100644
--- a/lib/private/AppFramework/Middleware/OCSMiddleware.php
+++ b/lib/private/AppFramework/Middleware/OCSMiddleware.php
@@ -101,7 +101,7 @@ class OCSMiddleware extends Middleware {
*/
if ($controller instanceof OCSController && !($response instanceof BaseResponse)) {
if ($response->getStatus() === Http::STATUS_UNAUTHORIZED ||
- $response->getStatus() === Http::STATUS_FORBIDDEN) {
+ $response->getStatus() === Http::STATUS_FORBIDDEN) {
$message = '';
if ($response instanceof JSONResponse) {
diff --git a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
index 16f1fb35a82..0ae2d37b374 100644
--- a/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
+++ b/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php
@@ -212,7 +212,7 @@ class SecurityMiddleware extends Middleware {
if($exception instanceof SecurityException) {
if($exception instanceof StrictCookieMissingException) {
return new RedirectResponse(\OC::$WEBROOT);
- }
+ }
if (stripos($this->request->getHeader('Accept'),'html') === false) {
$response = new JSONResponse(
['message' => $exception->getMessage()],
diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php
index 170048f451b..1cde13ef27e 100644
--- a/lib/private/Authentication/TwoFactorAuth/Manager.php
+++ b/lib/private/Authentication/TwoFactorAuth/Manager.php
@@ -198,8 +198,8 @@ class Manager {
$missing[] = $providerId;
$this->logger->alert("two-factor auth provider '$providerId' failed to load",
[
- 'app' => 'core',
- ]);
+ 'app' => 'core',
+ ]);
}
}
diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php
index 3b4a523b884..a45b1e05cfe 100644
--- a/lib/private/Comments/Comment.php
+++ b/lib/private/Comments/Comment.php
@@ -300,8 +300,8 @@ class Comment implements IComment {
*/
public function setActor($actorType, $actorId) {
if(
- !is_string($actorType) || !trim($actorType)
- || !is_string($actorId) || $actorId === ''
+ !is_string($actorType) || !trim($actorType)
+ || !is_string($actorId) || $actorId === ''
) {
throw new \InvalidArgumentException('String expected.');
}
@@ -386,8 +386,8 @@ class Comment implements IComment {
*/
public function setObject($objectType, $objectId) {
if(
- !is_string($objectType) || !trim($objectType)
- || !is_string($objectId) || trim($objectId) === ''
+ !is_string($objectType) || !trim($objectType)
+ || !is_string($objectId) || trim($objectId) === ''
) {
throw new \InvalidArgumentException('String expected.');
}
diff --git a/lib/private/DB/MySQLMigrator.php b/lib/private/DB/MySQLMigrator.php
index e178cfb55d8..fe56a9563e2 100644
--- a/lib/private/DB/MySQLMigrator.php
+++ b/lib/private/DB/MySQLMigrator.php
@@ -53,25 +53,25 @@ class MySQLMigrator extends Migrator {
return $schemaDiff;
}
- /**
- * Speed up migration test by disabling autocommit and unique indexes check
- *
- * @param \Doctrine\DBAL\Schema\Table $table
- * @throws \OC\DB\MigrationException
- */
- protected function checkTableMigrate(Table $table) {
- $this->connection->exec('SET autocommit=0');
- $this->connection->exec('SET unique_checks=0');
+ /**
+ * Speed up migration test by disabling autocommit and unique indexes check
+ *
+ * @param \Doctrine\DBAL\Schema\Table $table
+ * @throws \OC\DB\MigrationException
+ */
+ protected function checkTableMigrate(Table $table) {
+ $this->connection->exec('SET autocommit=0');
+ $this->connection->exec('SET unique_checks=0');
- try {
- parent::checkTableMigrate($table);
- } catch (\Exception $e) {
- $this->connection->exec('SET unique_checks=1');
- $this->connection->exec('SET autocommit=1');
- throw new MigrationException($table->getName(), $e->getMessage());
- }
- $this->connection->exec('SET unique_checks=1');
- $this->connection->exec('SET autocommit=1');
- }
+ try {
+ parent::checkTableMigrate($table);
+ } catch (\Exception $e) {
+ $this->connection->exec('SET unique_checks=1');
+ $this->connection->exec('SET autocommit=1');
+ throw new MigrationException($table->getName(), $e->getMessage());
+ }
+ $this->connection->exec('SET unique_checks=1');
+ $this->connection->exec('SET autocommit=1');
+ }
}
diff --git a/lib/private/Group/Database.php b/lib/private/Group/Database.php
index 8afd2c4aed2..48b01461531 100644
--- a/lib/private/Group/Database.php
+++ b/lib/private/Group/Database.php
@@ -62,14 +62,14 @@ use OCP\IDBConnection;
*/
class Database extends ABackend
implements IAddToGroupBackend,
- ICountDisabledInGroup,
- ICountUsersBackend,
- ICreateGroupBackend,
- IDeleteGroupBackend,
- IGetDisplayNameBackend,
- IGroupDetailsBackend,
- IRemoveFromGroupBackend,
- ISetDisplayNameBackend {
+ ICountDisabledInGroup,
+ ICountUsersBackend,
+ ICreateGroupBackend,
+ IDeleteGroupBackend,
+ IGetDisplayNameBackend,
+ IGroupDetailsBackend,
+ IRemoveFromGroupBackend,
+ ISetDisplayNameBackend {
/** @var string[] */
private $groupCache = [];
diff --git a/lib/private/Group/MetaData.php b/lib/private/Group/MetaData.php
index 97d71b51f98..3a2c08b0878 100644
--- a/lib/private/Group/MetaData.php
+++ b/lib/private/Group/MetaData.php
@@ -165,13 +165,13 @@ class MetaData {
*/
private function generateGroupMetaData(\OCP\IGroup $group, $userSearch) {
return [
- 'id' => $group->getGID(),
- 'name' => $group->getDisplayName(),
- 'usercount' => $this->sorting === self::SORT_USERCOUNT ? $group->count($userSearch) : 0,
- 'disabled' => $group->countDisabled(),
- 'canAdd' => $group->canAddUser(),
- 'canRemove' => $group->canRemoveUser(),
- ];
+ 'id' => $group->getGID(),
+ 'name' => $group->getDisplayName(),
+ 'usercount' => $this->sorting === self::SORT_USERCOUNT ? $group->count($userSearch) : 0,
+ 'disabled' => $group->countDisabled(),
+ 'canAdd' => $group->canAddUser(),
+ 'canRemove' => $group->canRemoveUser(),
+ ];
}
/**
diff --git a/lib/private/IntegrityCheck/Checker.php b/lib/private/IntegrityCheck/Checker.php
index 57a80e6f4bd..725d72d9c79 100644
--- a/lib/private/IntegrityCheck/Checker.php
+++ b/lib/private/IntegrityCheck/Checker.php
@@ -239,10 +239,10 @@ class Checker {
$signature = $privateKey->sign(json_encode($hashes));
return [
- 'hashes' => $hashes,
- 'signature' => base64_encode($signature),
- 'certificate' => $certificate->saveX509($certificate->currentCert),
- ];
+ 'hashes' => $hashes,
+ 'signature' => base64_encode($signature),
+ 'certificate' => $certificate->saveX509($certificate->currentCert),
+ ];
}
/**
@@ -509,10 +509,10 @@ class Checker {
);
} catch (\Exception $e) {
$result = [
- 'EXCEPTION' => [
- 'class' => \get_class($e),
- 'message' => $e->getMessage(),
- ],
+ 'EXCEPTION' => [
+ 'class' => \get_class($e),
+ 'message' => $e->getMessage(),
+ ],
];
}
$this->storeResults($appId, $result);
@@ -559,10 +559,10 @@ class Checker {
);
} catch (\Exception $e) {
$result = [
- 'EXCEPTION' => [
- 'class' => \get_class($e),
- 'message' => $e->getMessage(),
- ],
+ 'EXCEPTION' => [
+ 'class' => \get_class($e),
+ 'message' => $e->getMessage(),
+ ],
];
}
$this->storeResults('core', $result);
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php
index bb597460f9d..4ee8518981c 100644
--- a/lib/private/Preview/Generator.php
+++ b/lib/private/Preview/Generator.php
@@ -330,9 +330,9 @@ class Generator {
}
/*
- * Make sure the requested height and width fall within the max
- * of the preview.
- */
+ * Make sure the requested height and width fall within the max
+ * of the preview.
+ */
if ($height > $maxHeight) {
$ratio = $height / $maxHeight;
$height = $maxHeight;
diff --git a/lib/private/Security/TrustedDomainHelper.php b/lib/private/Security/TrustedDomainHelper.php
index 473e56cdd51..451d5074b69 100644
--- a/lib/private/Security/TrustedDomainHelper.php
+++ b/lib/private/Security/TrustedDomainHelper.php
@@ -99,9 +99,9 @@ class TrustedDomainHelper {
}
$regex = '/^' . implode('[-\.a-zA-Z0-9]*', array_map(function($v) { return preg_quote($v, '/'); }, explode('*', $trusted))) . '$/i';
if (preg_match($regex, $domain) || preg_match($regex, $domainWithPort)) {
- return true;
- }
- }
- return false;
+ return true;
+ }
+ }
+ return false;
}
}
diff --git a/lib/private/Share/Share.php b/lib/private/Share/Share.php
index 2bc2afbea2e..bd53c0307a6 100644
--- a/lib/private/Share/Share.php
+++ b/lib/private/Share/Share.php
@@ -1359,7 +1359,7 @@ class Share extends Constants {
$select = '`*PREFIX*share`.`id`, `item_type`, `item_source`, `item_target`,'
. '`*PREFIX*share`.`parent`, `share_type`, `share_with`, `uid_owner`,'
. '`file_source`, `path`, `file_target`, `*PREFIX*share`.`permissions`,'
- . '`stime`, `expiration`, `token`, `storage`, `mail_send`,'
+ . '`stime`, `expiration`, `token`, `storage`, `mail_send`,'
. '`*PREFIX*storages`.`id` AS `storage_id`, `*PREFIX*filecache`.`parent` as `file_parent`';
}
}
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php
index 065d06de37e..2eda7295c1e 100644
--- a/lib/private/Share20/DefaultShareProvider.php
+++ b/lib/private/Share20/DefaultShareProvider.php
@@ -838,7 +838,7 @@ class DefaultShareProvider implements IShareProvider {
$pathSections = explode('/', $data['path'], 2);
// FIXME: would not detect rare md5'd home storage case properly
if ($pathSections[0] !== 'files'
- && in_array(explode(':', $data['storage_string_id'], 2)[0], ['home', 'object'])) {
+ && in_array(explode(':', $data['storage_string_id'], 2)[0], ['home', 'object'])) {
return false;
}
return true;
@@ -961,8 +961,8 @@ class DefaultShareProvider implements IShareProvider {
}
/*
- * Resolve all group shares to user specific shares
- */
+ * Resolve all group shares to user specific shares
+ */
$shares = $this->resolveGroupShares($shares2, $userId);
} else {
throw new BackendError('Invalid backend');
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 4e1f6567e6b..2a25ed92d12 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -932,7 +932,7 @@ class Manager implements IManager {
// We can only change the recipient on user shares
if ($share->getSharedWith() !== $originalShare->getSharedWith() &&
- $share->getShareType() !== \OCP\Share::SHARE_TYPE_USER) {
+ $share->getShareType() !== \OCP\Share::SHARE_TYPE_USER) {
throw new \InvalidArgumentException('Can only update recipient on user shares');
}
diff --git a/lib/private/SubAdmin.php b/lib/private/SubAdmin.php
index ce2a38ccbf6..05d23bee587 100644
--- a/lib/private/SubAdmin.php
+++ b/lib/private/SubAdmin.php
@@ -54,7 +54,7 @@ class SubAdmin extends PublicEmitter implements ISubAdmin {
* @param IDBConnection $dbConn
*/
public function __construct(IUserManager $userManager,
- IGroupManager $groupManager,
+ IGroupManager $groupManager,
IDBConnection $dbConn) {
$this->userManager = $userManager;
$this->groupManager = $groupManager;
diff --git a/lib/private/Tagging/Tag.php b/lib/private/Tagging/Tag.php
index 971b2da053b..e82860c1d3d 100644
--- a/lib/private/Tagging/Tag.php
+++ b/lib/private/Tagging/Tag.php
@@ -65,11 +65,11 @@ class Tag extends Entity {
*/
public function columnToProperty($columnName){
if ($columnName === 'category') {
- return 'name';
+ return 'name';
} elseif ($columnName === 'uid') {
- return 'owner';
+ return 'owner';
} else {
- return parent::columnToProperty($columnName);
+ return parent::columnToProperty($columnName);
}
}
@@ -81,11 +81,11 @@ class Tag extends Entity {
*/
public function propertyToColumn($property){
if ($property === 'name') {
- return 'category';
+ return 'category';
} elseif ($property === 'owner') {
- return 'uid';
+ return 'uid';
} else {
- return parent::propertyToColumn($property);
+ return parent::propertyToColumn($property);
}
}
}
diff --git a/lib/private/Tags.php b/lib/private/Tags.php
index 6a174748a31..15b225b2ff8 100644
--- a/lib/private/Tags.php
+++ b/lib/private/Tags.php
@@ -504,7 +504,7 @@ class Tags implements ITags {
'objid' => $relation['objid'],
'categoryid' => $tagId,
'type' => $this->type,
- ]);
+ ]);
} catch(\Exception $e) {
\OC::$server->getLogger()->logException($e, [
'message' => __METHOD__,
diff --git a/lib/private/User/Database.php b/lib/private/User/Database.php
index 856959a4596..c89d3ce3690 100644
--- a/lib/private/User/Database.php
+++ b/lib/private/User/Database.php
@@ -78,13 +78,13 @@ use OCP\User\Backend\ISetPasswordBackend;
*/
class Database extends ABackend
implements ICreateUserBackend,
- ISetPasswordBackend,
- ISetDisplayNameBackend,
- IGetDisplayNameBackend,
- ICheckPasswordBackend,
- IGetHomeBackend,
- ICountUsersBackend,
- IGetRealUIDBackend {
+ ISetPasswordBackend,
+ ISetDisplayNameBackend,
+ IGetDisplayNameBackend,
+ ICheckPasswordBackend,
+ IGetHomeBackend,
+ ICountUsersBackend,
+ IGetRealUIDBackend {
/** @var CappedMemoryCache */
private $cache;
diff --git a/lib/private/legacy/OC_Defaults.php b/lib/private/legacy/OC_Defaults.php
index 73443adb031..d5a4b5eecee 100644
--- a/lib/private/legacy/OC_Defaults.php
+++ b/lib/private/legacy/OC_Defaults.php
@@ -322,7 +322,7 @@ class OC_Defaults {
} else {
$logo = \OC::$server->getURLGenerator()->imagePath('core', 'logo/logo.png');
}
- return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion()));
+ return $logo . '?v=' . hash('sha1', implode('.', \OCP\Util::getVersion()));
}
public function getTextColorPrimary() {
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index 249d3e5154f..72983f50d9c 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -84,19 +84,19 @@ class OC_Files {
$type = \OC::$server->getMimeTypeDetector()->getSecureMimeType(\OC\Files\Filesystem::getMimeType($filename));
if ($fileSize > -1) {
if (!empty($rangeArray)) {
- http_response_code(206);
- header('Accept-Ranges: bytes', true);
- if (count($rangeArray) > 1) {
+ http_response_code(206);
+ header('Accept-Ranges: bytes', true);
+ if (count($rangeArray) > 1) {
$type = 'multipart/byteranges; boundary='.self::getBoundary();
// no Content-Length header here
- }
- else {
+ }
+ else {
header(sprintf('Content-Range: bytes %d-%d/%d', $rangeArray[0]['from'], $rangeArray[0]['to'], $fileSize), true);
OC_Response::setContentLengthHeader($rangeArray[0]['to'] - $rangeArray[0]['from'] + 1);
- }
+ }
}
else {
- OC_Response::setContentLengthHeader($fileSize);
+ OC_Response::setContentLengthHeader($fileSize);
}
}
header('Content-Type: '.$type, true);
@@ -329,10 +329,10 @@ class OC_Files {
if (!empty($rangeArray)) {
try {
- if (count($rangeArray) == 1) {
+ if (count($rangeArray) == 1) {
$view->readfilePart($filename, $rangeArray[0]['from'], $rangeArray[0]['to']);
- }
- else {
+ }
+ else {
// check if file is seekable (if not throw UnseekableException)
// we have to check it before body contents
$view->readfilePart($filename, $rangeArray[0]['size'], $rangeArray[0]['size']);
@@ -340,24 +340,24 @@ class OC_Files {
$type = \OC::$server->getMimeTypeDetector()->getSecureMimeType(\OC\Files\Filesystem::getMimeType($filename));
foreach ($rangeArray as $range) {
- echo "\r\n--".self::getBoundary()."\r\n".
- "Content-type: ".$type."\r\n".
- "Content-range: bytes ".$range['from']."-".$range['to']."/".$range['size']."\r\n\r\n";
- $view->readfilePart($filename, $range['from'], $range['to']);
+ echo "\r\n--".self::getBoundary()."\r\n".
+ "Content-type: ".$type."\r\n".
+ "Content-range: bytes ".$range['from']."-".$range['to']."/".$range['size']."\r\n\r\n";
+ $view->readfilePart($filename, $range['from'], $range['to']);
}
echo "\r\n--".self::getBoundary()."--\r\n";
- }
+ }
} catch (\OCP\Files\UnseekableException $ex) {
- // file is unseekable
- header_remove('Accept-Ranges');
- header_remove('Content-Range');
- http_response_code(200);
- self::sendHeaders($filename, $name, []);
- $view->readfile($filename);
+ // file is unseekable
+ header_remove('Accept-Ranges');
+ header_remove('Content-Range');
+ http_response_code(200);
+ self::sendHeaders($filename, $name, []);
+ $view->readfile($filename);
}
}
else {
- $view->readfile($filename);
+ $view->readfile($filename);
}
}
diff --git a/lib/private/legacy/OC_Hook.php b/lib/private/legacy/OC_Hook.php
index 2918dd4282f..3cc29a58c77 100644
--- a/lib/private/legacy/OC_Hook.php
+++ b/lib/private/legacy/OC_Hook.php
@@ -71,8 +71,8 @@ class OC_Hook {
}
// Connect the hook handler to the requested emitter
self::$registered[$signalClass][$signalName][] = [
- "class" => $slotClass,
- "name" => $slotName
+ "class" => $slotClass,
+ "name" => $slotName
];
// No chance for failure ;-)