diff options
author | Joas Schilling <coding@schilljs.com> | 2023-11-23 10:22:34 +0100 |
---|---|---|
committer | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2023-11-23 10:36:13 +0100 |
commit | aa5f037af71c915424c6dcfd5ad2dc82797dc0d6 (patch) | |
tree | 843203cd1346158aab3515687e37a90e78c929e9 /core | |
parent | 272719ed1cba6836ea0a597bb9767754eeb1e0d4 (diff) | |
download | nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.tar.gz nextcloud-server-aa5f037af71c915424c6dcfd5ad2dc82797dc0d6.zip |
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'core')
42 files changed, 115 insertions, 115 deletions
diff --git a/core/Command/Base.php b/core/Command/Base.php index 2581e273cb9..f8b864c5864 100644 --- a/core/Command/Base.php +++ b/core/Command/Base.php @@ -26,8 +26,8 @@ namespace OC\Core\Command; use OC\Core\Command\User\ListCommand; -use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; use Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionAwareInterface; +use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Input\InputInterface; diff --git a/core/Command/Broadcast/Test.php b/core/Command/Broadcast/Test.php index da450f30ca8..22a65d86e7b 100644 --- a/core/Command/Broadcast/Test.php +++ b/core/Command/Broadcast/Test.php @@ -68,7 +68,7 @@ class Test extends Command { private $uid; public function __construct(string $name, - string $uid) { + string $uid) { parent::__construct(); $this->name = $name; $this->uid = $uid; diff --git a/core/Command/Db/AddMissingIndices.php b/core/Command/Db/AddMissingIndices.php index 56dbf8ce8d9..bd47fea20fe 100644 --- a/core/Command/Db/AddMissingIndices.php +++ b/core/Command/Db/AddMissingIndices.php @@ -38,8 +38,8 @@ use OC\DB\SchemaWrapper; use OCP\DB\Events\AddMissingIndicesEvent; use OCP\EventDispatcher\IEventDispatcher; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; /** diff --git a/core/Command/Db/ConvertFilecacheBigInt.php b/core/Command/Db/ConvertFilecacheBigInt.php index e10382c6fbb..d73058767f2 100644 --- a/core/Command/Db/ConvertFilecacheBigInt.php +++ b/core/Command/Db/ConvertFilecacheBigInt.php @@ -33,9 +33,9 @@ namespace OC\Core\Command\Db; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Types\Type; -use OCP\DB\Types; use OC\DB\Connection; use OC\DB\SchemaWrapper; +use OCP\DB\Types; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; diff --git a/core/Command/Db/ConvertType.php b/core/Command/Db/ConvertType.php index e95a6f47c1f..a1bfbd1fd3e 100644 --- a/core/Command/Db/ConvertType.php +++ b/core/Command/Db/ConvertType.php @@ -35,11 +35,11 @@ namespace OC\Core\Command\Db; use Doctrine\DBAL\Exception; use Doctrine\DBAL\Schema\AbstractAsset; use Doctrine\DBAL\Schema\Table; -use OCP\DB\Types; use OC\DB\Connection; use OC\DB\ConnectionFactory; use OC\DB\MigrationService; use OCP\DB\QueryBuilder\IQueryBuilder; +use OCP\DB\Types; use OCP\IConfig; use Stecman\Component\Symfony\Console\BashCompletion\Completion\CompletionAwareInterface; use Stecman\Component\Symfony\Console\BashCompletion\CompletionContext; diff --git a/core/Command/Info/FileUtils.php b/core/Command/Info/FileUtils.php index 000cb0eb3d6..694f30f78b4 100644 --- a/core/Command/Info/FileUtils.php +++ b/core/Command/Info/FileUtils.php @@ -30,6 +30,7 @@ use OCA\GroupFolders\Mount\GroupMountPoint; use OCP\Constants; use OCP\Files\Config\IUserMountCache; use OCP\Files\FileInfo; +use OCP\Files\Folder; use OCP\Files\IHomeStorage; use OCP\Files\IRootFolder; use OCP\Files\Mount\IMountPoint; @@ -38,7 +39,6 @@ use OCP\Files\NotFoundException; use OCP\Share\IShare; use OCP\Util; use Symfony\Component\Console\Output\OutputInterface; -use OCP\Files\Folder; class FileUtils { public function __construct( diff --git a/core/Command/Maintenance/Repair.php b/core/Command/Maintenance/Repair.php index 6c40ca2820f..021e83e0833 100644 --- a/core/Command/Maintenance/Repair.php +++ b/core/Command/Maintenance/Repair.php @@ -29,10 +29,6 @@ namespace OC\Core\Command\Maintenance; use Exception; -use OCP\App\IAppManager; -use OCP\EventDispatcher\Event; -use OCP\EventDispatcher\IEventDispatcher; -use OCP\IConfig; use OC\Repair\Events\RepairAdvanceEvent; use OC\Repair\Events\RepairErrorEvent; use OC\Repair\Events\RepairFinishEvent; @@ -40,6 +36,10 @@ use OC\Repair\Events\RepairInfoEvent; use OC\Repair\Events\RepairStartEvent; use OC\Repair\Events\RepairStepEvent; use OC\Repair\Events\RepairWarningEvent; +use OCP\App\IAppManager; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventDispatcher; +use OCP\IConfig; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; use Symfony\Component\Console\Input\InputInterface; diff --git a/core/Command/Maintenance/RepairShareOwnership.php b/core/Command/Maintenance/RepairShareOwnership.php index e3c8a82c9d6..a89b9660a8c 100644 --- a/core/Command/Maintenance/RepairShareOwnership.php +++ b/core/Command/Maintenance/RepairShareOwnership.php @@ -26,11 +26,11 @@ declare(strict_types=1); namespace OC\Core\Command\Maintenance; -use Symfony\Component\Console\Command\Command; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\IDBConnection; use OCP\IUser; use OCP\IUserManager; +use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; diff --git a/core/Command/Preview/Generate.php b/core/Command/Preview/Generate.php index 6697afa537c..a885d224fc7 100644 --- a/core/Command/Preview/Generate.php +++ b/core/Command/Preview/Generate.php @@ -24,9 +24,9 @@ declare(strict_types=1); namespace OC\Core\Command\Preview; use OCP\Files\Config\IUserMountCache; +use OCP\Files\File; use OCP\Files\IRootFolder; use OCP\Files\Node; -use OCP\Files\File; use OCP\Files\NotFoundException; use OCP\IPreview; use Symfony\Component\Console\Command\Command; diff --git a/core/Command/TwoFactorAuth/Enforce.php b/core/Command/TwoFactorAuth/Enforce.php index e747ff99d59..57b07308afe 100644 --- a/core/Command/TwoFactorAuth/Enforce.php +++ b/core/Command/TwoFactorAuth/Enforce.php @@ -26,13 +26,13 @@ declare(strict_types=1); */ namespace OC\Core\Command\TwoFactorAuth; -use function implode; use OC\Authentication\TwoFactorAuth\EnforcementState; use OC\Authentication\TwoFactorAuth\MandatoryTwoFactor; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use function implode; class Enforce extends Command { public function __construct( diff --git a/core/Command/TwoFactorAuth/State.php b/core/Command/TwoFactorAuth/State.php index ddae1fe963a..5663056b50a 100644 --- a/core/Command/TwoFactorAuth/State.php +++ b/core/Command/TwoFactorAuth/State.php @@ -92,7 +92,7 @@ class State extends Base { } private function printProviders(string $title, array $providers, - OutputInterface $output) { + OutputInterface $output) { if (empty($providers)) { // Ignore and don't print anything return; diff --git a/core/Command/Upgrade.php b/core/Command/Upgrade.php index 078f994d051..30acd8f7d4d 100644 --- a/core/Command/Upgrade.php +++ b/core/Command/Upgrade.php @@ -33,10 +33,6 @@ */ namespace OC\Core\Command; -use OCP\EventDispatcher\Event; -use OCP\EventDispatcher\IEventDispatcher; -use OCP\IConfig; -use OCP\Util; use OC\Console\TimestampFormatter; use OC\DB\MigratorExecuteSqlEvent; use OC\Installer; @@ -48,6 +44,10 @@ use OC\Repair\Events\RepairStartEvent; use OC\Repair\Events\RepairStepEvent; use OC\Repair\Events\RepairWarningEvent; use OC\Updater; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventDispatcher; +use OCP\IConfig; +use OCP\Util; use Psr\Log\LoggerInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Helper\ProgressBar; diff --git a/core/Command/User/AuthTokens/Delete.php b/core/Command/User/AuthTokens/Delete.php index 8cd6f2e6205..56bfcf787f8 100644 --- a/core/Command/User/AuthTokens/Delete.php +++ b/core/Command/User/AuthTokens/Delete.php @@ -23,8 +23,8 @@ namespace OC\Core\Command\User\AuthTokens; use DateTimeImmutable; -use OC\Core\Command\Base; use OC\Authentication\Token\IProvider; +use OC\Core\Command\Base; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Input\InputArgument; diff --git a/core/Command/User/AuthTokens/ListCommand.php b/core/Command/User/AuthTokens/ListCommand.php index bfc49606259..0bcd2e55225 100644 --- a/core/Command/User/AuthTokens/ListCommand.php +++ b/core/Command/User/AuthTokens/ListCommand.php @@ -22,9 +22,9 @@ */ namespace OC\Core\Command\User\AuthTokens; -use OC\Core\Command\Base; use OC\Authentication\Token\IProvider; use OC\Authentication\Token\IToken; +use OC\Core\Command\Base; use OCP\IUserManager; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; diff --git a/core/Controller/ClientFlowLoginController.php b/core/Controller/ClientFlowLoginController.php index 0a073a586e4..07a78ba368b 100644 --- a/core/Controller/ClientFlowLoginController.php +++ b/core/Controller/ClientFlowLoginController.php @@ -181,8 +181,8 @@ class ClientFlowLoginController extends Controller { */ #[UseSession] public function grantPage(string $stateToken = '', - string $clientIdentifier = '', - int $direct = 0): StandaloneTemplateResponse { + string $clientIdentifier = '', + int $direct = 0): StandaloneTemplateResponse { if (!$this->isValidToken($stateToken)) { return $this->stateTokenForbiddenResponse(); } @@ -233,7 +233,7 @@ class ClientFlowLoginController extends Controller { */ #[UseSession] public function generateAppPassword(string $stateToken, - string $clientIdentifier = '') { + string $clientIdentifier = '') { if (!$this->isValidToken($stateToken)) { $this->session->remove(self::STATE_NAME); return $this->stateTokenForbiddenResponse(); diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 4f754204132..db3e8a64d64 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -272,11 +272,11 @@ class LoginController extends Controller { */ #[UseSession] public function tryLogin(Chain $loginChain, - string $user = '', - string $password = '', - string $redirect_url = null, - string $timezone = '', - string $timezone_offset = ''): RedirectResponse { + string $user = '', + string $password = '', + string $redirect_url = null, + string $timezone = '', + string $timezone_offset = ''): RedirectResponse { if (!$this->request->passesCSRFCheck()) { if ($this->userSession->isLoggedIn()) { // If the user is already logged in and the CSRF check does not pass then diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index 9a1424c4c48..56b8b8eadcb 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -37,6 +37,12 @@ namespace OC\Core\Controller; use Exception; +use OC\Authentication\TwoFactorAuth\Manager; +use OC\Core\Events\BeforePasswordResetEvent; +use OC\Core\Events\PasswordResetEvent; +use OC\Core\Exception\ResetPasswordException; +use OC\Security\RateLimiting\Exception\RateLimitExceededException; +use OC\Security\RateLimiting\Limiter; use OCP\AppFramework\Controller; use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; use OCP\AppFramework\Http\JSONResponse; @@ -54,14 +60,8 @@ use OCP\IURLGenerator; use OCP\IUser; use OCP\IUserManager; use OCP\Mail\IMailer; -use OCP\Security\VerificationToken\IVerificationToken; use OCP\Security\VerificationToken\InvalidTokenException; -use OC\Authentication\TwoFactorAuth\Manager; -use OC\Core\Events\BeforePasswordResetEvent; -use OC\Core\Events\PasswordResetEvent; -use OC\Core\Exception\ResetPasswordException; -use OC\Security\RateLimiting\Exception\RateLimitExceededException; -use OC\Security\RateLimiting\Limiter; +use OCP\Security\VerificationToken\IVerificationToken; use Psr\Log\LoggerInterface; use function array_filter; use function count; diff --git a/core/Controller/ProfileApiController.php b/core/Controller/ProfileApiController.php index cc91fb7d576..193102c20a7 100644 --- a/core/Controller/ProfileApiController.php +++ b/core/Controller/ProfileApiController.php @@ -28,6 +28,7 @@ declare(strict_types=1); namespace OC\Core\Controller; use OC\Core\Db\ProfileConfigMapper; +use OC\Profile\ProfileManager; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\OCS\OCSBadRequestException; @@ -37,7 +38,6 @@ use OCP\AppFramework\OCSController; use OCP\IRequest; use OCP\IUserManager; use OCP\IUserSession; -use OC\Profile\ProfileManager; class ProfileApiController extends OCSController { public function __construct( diff --git a/core/Controller/ProfilePageController.php b/core/Controller/ProfilePageController.php index e32f54a8ff7..8ea2ad699c1 100644 --- a/core/Controller/ProfilePageController.php +++ b/core/Controller/ProfilePageController.php @@ -28,19 +28,19 @@ declare(strict_types=1); namespace OC\Core\Controller; use OC\Profile\ProfileManager; -use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; -use OCP\Profile\BeforeTemplateRenderedEvent; use OCP\AppFramework\Controller; +use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Services\IInitialState; +use OCP\EventDispatcher\IEventDispatcher; +use OCP\INavigationManager; use OCP\IRequest; use OCP\IUser; use OCP\IUserManager; use OCP\IUserSession; +use OCP\Profile\BeforeTemplateRenderedEvent; use OCP\Share\IManager as IShareManager; use OCP\UserStatus\IManager as IUserStatusManager; -use OCP\EventDispatcher\IEventDispatcher; -use OCP\INavigationManager; #[IgnoreOpenAPI] class ProfilePageController extends Controller { diff --git a/core/Controller/ReferenceController.php b/core/Controller/ReferenceController.php index cec2dc90cf5..8d1ff7f86d2 100644 --- a/core/Controller/ReferenceController.php +++ b/core/Controller/ReferenceController.php @@ -25,11 +25,11 @@ declare(strict_types=1); namespace OC\Core\Controller; -use OCP\Collaboration\Reference\IReferenceManager; use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataDownloadResponse; use OCP\AppFramework\Http\DataResponse; +use OCP\Collaboration\Reference\IReferenceManager; use OCP\Files\AppData\IAppDataFactory; use OCP\Files\NotFoundException; use OCP\Files\NotPermittedException; diff --git a/core/Controller/TextProcessingApiController.php b/core/Controller/TextProcessingApiController.php index a6b85fd46ae..cbba7e976b0 100644 --- a/core/Controller/TextProcessingApiController.php +++ b/core/Controller/TextProcessingApiController.php @@ -38,11 +38,11 @@ use OCP\Common\Exception\NotFoundException; use OCP\DB\Exception; use OCP\IL10N; use OCP\IRequest; +use OCP\PreConditionNotMetException; use OCP\TextProcessing\Exception\TaskFailureException; +use OCP\TextProcessing\IManager; use OCP\TextProcessing\ITaskType; use OCP\TextProcessing\Task; -use OCP\TextProcessing\IManager; -use OCP\PreConditionNotMetException; use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerInterface; use Psr\Container\NotFoundExceptionInterface; diff --git a/core/Controller/TextToImageApiController.php b/core/Controller/TextToImageApiController.php index 13ce4658d59..9d97a538750 100644 --- a/core/Controller/TextToImageApiController.php +++ b/core/Controller/TextToImageApiController.php @@ -40,11 +40,11 @@ use OCP\DB\Exception; use OCP\Files\NotFoundException; use OCP\IL10N; use OCP\IRequest; +use OCP\PreConditionNotMetException; use OCP\TextToImage\Exception\TaskFailureException; use OCP\TextToImage\Exception\TaskNotFoundException; -use OCP\TextToImage\Task; use OCP\TextToImage\IManager; -use OCP\PreConditionNotMetException; +use OCP\TextToImage\Task; /** * @psalm-import-type CoreTextToImageTask from ResponseDefinitions diff --git a/core/Controller/UnifiedSearchController.php b/core/Controller/UnifiedSearchController.php index 5ae99c6a076..9754515603c 100644 --- a/core/Controller/UnifiedSearchController.php +++ b/core/Controller/UnifiedSearchController.php @@ -31,6 +31,7 @@ namespace OC\Core\Controller; use InvalidArgumentException; use OC\Search\SearchComposer; use OC\Search\SearchQuery; +use OC\Search\UnsupportedFilter; use OCA\Core\ResponseDefinitions; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; @@ -40,7 +41,6 @@ use OCP\IURLGenerator; use OCP\IUserSession; use OCP\Route\IRouter; use OCP\Search\ISearchQuery; -use OC\Search\UnsupportedFilter; use Symfony\Component\Routing\Exception\ResourceNotFoundException; /** diff --git a/core/Db/ProfileConfig.php b/core/Db/ProfileConfig.php index 0cdf132ca96..122adca88d0 100644 --- a/core/Db/ProfileConfig.php +++ b/core/Db/ProfileConfig.php @@ -26,11 +26,11 @@ declare(strict_types=1); namespace OC\Core\Db; -use function json_decode; -use function json_encode; use \JsonSerializable; use OCP\AppFramework\Db\Entity; use OCP\Profile\ParameterDoesNotExistException; +use function json_decode; +use function json_encode; /** * @method string getUserId() diff --git a/core/Migrations/Version13000Date20170705121758.php b/core/Migrations/Version13000Date20170705121758.php index 9436502b4a0..922e8a93587 100644 --- a/core/Migrations/Version13000Date20170705121758.php +++ b/core/Migrations/Version13000Date20170705121758.php @@ -25,8 +25,8 @@ */ namespace OC\Core\Migrations; -use OCP\DB\Types; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version13000Date20170718121200.php b/core/Migrations/Version13000Date20170718121200.php index f0e489922fb..da83b0732d8 100644 --- a/core/Migrations/Version13000Date20170718121200.php +++ b/core/Migrations/Version13000Date20170718121200.php @@ -32,8 +32,8 @@ namespace OC\Core\Migrations; use Doctrine\DBAL\Platforms\PostgreSQL94Platform; -use OCP\DB\Types; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\IDBConnection; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -751,7 +751,7 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { 'unsigned' => true, ]); $table->setPrimaryKey(['objecttype', 'objectid', 'systemtagid'], 'som_pk'); -// $table->addUniqueIndex(['objecttype', 'objectid', 'systemtagid'], 'mapping'); + // $table->addUniqueIndex(['objecttype', 'objectid', 'systemtagid'], 'mapping'); $table->addIndex(['systemtagid', 'objecttype'], 'systag_by_tagid'); } @@ -888,25 +888,25 @@ class Version13000Date20170718121200 extends SimpleMigrationStep { ]); $table->addIndex(['object_type', 'object_id'], 'comments_marker_object_index'); $table->setPrimaryKey(['user_id', 'object_type', 'object_id'], 'crm_pk'); -// $table->addUniqueIndex(['user_id', 'object_type', 'object_id'], 'comments_marker_index'); + // $table->addUniqueIndex(['user_id', 'object_type', 'object_id'], 'comments_marker_index'); } -// if (!$schema->hasTable('credentials')) { -// $table = $schema->createTable('credentials'); -// $table->addColumn('user', 'string', [ -// 'notnull' => false, -// 'length' => 64, -// ]); -// $table->addColumn('identifier', 'string', [ -// 'notnull' => true, -// 'length' => 64, -// ]); -// $table->addColumn('credentials', 'text', [ -// 'notnull' => false, -// ]); -// $table->setPrimaryKey(['user', 'identifier']); -// $table->addIndex(['user'], 'credentials_user'); -// } + // if (!$schema->hasTable('credentials')) { + // $table = $schema->createTable('credentials'); + // $table->addColumn('user', 'string', [ + // 'notnull' => false, + // 'length' => 64, + // ]); + // $table->addColumn('identifier', 'string', [ + // 'notnull' => true, + // 'length' => 64, + // ]); + // $table->addColumn('credentials', 'text', [ + // 'notnull' => false, + // ]); + // $table->setPrimaryKey(['user', 'identifier']); + // $table->addIndex(['user'], 'credentials_user'); + // } if (!$schema->hasTable('admin_sections')) { $table = $schema->createTable('admin_sections'); diff --git a/core/Migrations/Version14000Date20180522074438.php b/core/Migrations/Version14000Date20180522074438.php index 57358eca662..d12750fa77d 100644 --- a/core/Migrations/Version14000Date20180522074438.php +++ b/core/Migrations/Version14000Date20180522074438.php @@ -33,7 +33,7 @@ use OCP\Migration\SimpleMigrationStep; class Version14000Date20180522074438 extends SimpleMigrationStep { public function changeSchema(IOutput $output, Closure $schemaClosure, - array $options): ISchemaWrapper { + array $options): ISchemaWrapper { $schema = $schemaClosure(); if (!$schema->hasTable('twofactor_providers')) { diff --git a/core/Migrations/Version14000Date20180710092004.php b/core/Migrations/Version14000Date20180710092004.php index 30ac28ccb6e..d04cc30eadf 100644 --- a/core/Migrations/Version14000Date20180710092004.php +++ b/core/Migrations/Version14000Date20180710092004.php @@ -29,8 +29,8 @@ declare(strict_types=1); */ namespace OC\Core\Migrations; -use OCP\DB\Types; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version16000Date20190207141427.php b/core/Migrations/Version16000Date20190207141427.php index 6dc5a5b1773..7729f920373 100644 --- a/core/Migrations/Version16000Date20190207141427.php +++ b/core/Migrations/Version16000Date20190207141427.php @@ -29,8 +29,8 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use OCP\DB\Types; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -76,7 +76,7 @@ class Version16000Date20190207141427 extends SimpleMigrationStep { ]); $table->setPrimaryKey(['collection_id', 'resource_type', 'resource_id'], 'crr_pk'); -// $table->addUniqueIndex(['collection_id', 'resource_type', 'resource_id'], 'collres_unique_res'); + // $table->addUniqueIndex(['collection_id', 'resource_type', 'resource_id'], 'collres_unique_res'); } if (!$schema->hasTable('collres_accesscache')) { @@ -106,7 +106,7 @@ class Version16000Date20190207141427 extends SimpleMigrationStep { ]); $table->setPrimaryKey(['user_id', 'collection_id', 'resource_type', 'resource_id'], 'cra_pk'); -// $table->addUniqueIndex(['user_id', 'collection_id', 'resource_type', 'resource_id'], 'collres_unique_user'); + // $table->addUniqueIndex(['user_id', 'collection_id', 'resource_type', 'resource_id'], 'collres_unique_user'); $table->addIndex(['user_id', 'resource_type', 'resource_id'], 'collres_user_res'); $table->addIndex(['user_id', 'collection_id'], 'collres_user_coll'); } diff --git a/core/Migrations/Version16000Date20190212081545.php b/core/Migrations/Version16000Date20190212081545.php index 00ca7f84592..a1cda37c3a1 100644 --- a/core/Migrations/Version16000Date20190212081545.php +++ b/core/Migrations/Version16000Date20190212081545.php @@ -29,8 +29,8 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use OCP\DB\Types; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version16000Date20190428150708.php b/core/Migrations/Version16000Date20190428150708.php index 61d5ee0d2fa..5513df828a7 100644 --- a/core/Migrations/Version16000Date20190428150708.php +++ b/core/Migrations/Version16000Date20190428150708.php @@ -29,8 +29,8 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use OCP\DB\Types; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version17000Date20190514105811.php b/core/Migrations/Version17000Date20190514105811.php index 6e081f7214d..5e7551fea91 100644 --- a/core/Migrations/Version17000Date20190514105811.php +++ b/core/Migrations/Version17000Date20190514105811.php @@ -30,8 +30,8 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use OCP\DB\Types; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; @@ -67,7 +67,7 @@ class Version17000Date20190514105811 extends SimpleMigrationStep { 'default' => 0, ]); $table->setPrimaryKey(['fileid'], 'fce_pk'); -// $table->addUniqueIndex(['fileid'], 'fce_fileid_idx'); + // $table->addUniqueIndex(['fileid'], 'fce_fileid_idx'); $table->addIndex(['creation_time'], 'fce_ctime_idx'); $table->addIndex(['upload_time'], 'fce_utime_idx'); } diff --git a/core/Migrations/Version18000Date20190920085628.php b/core/Migrations/Version18000Date20190920085628.php index 2d28468fd0b..8576d6b9873 100644 --- a/core/Migrations/Version18000Date20190920085628.php +++ b/core/Migrations/Version18000Date20190920085628.php @@ -29,8 +29,8 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use OCP\DB\Types; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\IDBConnection; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version18000Date20191014105105.php b/core/Migrations/Version18000Date20191014105105.php index b659977d55f..2404f8b79b5 100644 --- a/core/Migrations/Version18000Date20191014105105.php +++ b/core/Migrations/Version18000Date20191014105105.php @@ -29,11 +29,11 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use OCP\DB\Types; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\IDBConnection; -use OCP\Migration\SimpleMigrationStep; use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; class Version18000Date20191014105105 extends SimpleMigrationStep { public function __construct( diff --git a/core/Migrations/Version18000Date20191204114856.php b/core/Migrations/Version18000Date20191204114856.php index 1c5c623e7be..618fa46b5ab 100644 --- a/core/Migrations/Version18000Date20191204114856.php +++ b/core/Migrations/Version18000Date20191204114856.php @@ -28,8 +28,8 @@ namespace OC\Core\Migrations; use Closure; use OCP\DB\ISchemaWrapper; use OCP\IDBConnection; -use OCP\Migration\SimpleMigrationStep; use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; class Version18000Date20191204114856 extends SimpleMigrationStep { public function __construct( diff --git a/core/Migrations/Version20000Date20201109081915.php b/core/Migrations/Version20000Date20201109081915.php index 6e23c0b4bfd..c99650b783d 100644 --- a/core/Migrations/Version20000Date20201109081915.php +++ b/core/Migrations/Version20000Date20201109081915.php @@ -43,7 +43,7 @@ class Version20000Date20201109081915 extends SimpleMigrationStep { $result = $this->ensureColumnIsNullable($schema, 'share', 'password_by_talk'); $result = $this->ensureColumnIsNullable($schema, 'share', 'hide_download') || $result; -// $result = $this->ensureColumnIsNullable($schema, 'credentials', 'user') || $result; + // $result = $this->ensureColumnIsNullable($schema, 'credentials', 'user') || $result; $result = $this->ensureColumnIsNullable($schema, 'authtoken', 'password_invalid') || $result; $result = $this->ensureColumnIsNullable($schema, 'collres_accesscache', 'access') || $result; diff --git a/core/Migrations/Version20000Date20201109081918.php b/core/Migrations/Version20000Date20201109081918.php index 5c275ed2c3a..d060d7e306a 100644 --- a/core/Migrations/Version20000Date20201109081918.php +++ b/core/Migrations/Version20000Date20201109081918.php @@ -28,8 +28,8 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use OCP\DB\Types; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\IDBConnection; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version21000Date20201202095923.php b/core/Migrations/Version21000Date20201202095923.php index c087447f050..f6473c07715 100644 --- a/core/Migrations/Version21000Date20201202095923.php +++ b/core/Migrations/Version21000Date20201202095923.php @@ -27,8 +27,8 @@ declare(strict_types=1); namespace OC\Core\Migrations; use Closure; -use OCP\DB\Types; use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; use OCP\Migration\IOutput; use OCP\Migration\SimpleMigrationStep; diff --git a/core/Migrations/Version23000Date20210721100600.php b/core/Migrations/Version23000Date20210721100600.php index 1169ca4039e..0218ebaaa41 100644 --- a/core/Migrations/Version23000Date20210721100600.php +++ b/core/Migrations/Version23000Date20210721100600.php @@ -26,8 +26,8 @@ namespace OC\Core\Migrations; use Closure; use OCP\DB\ISchemaWrapper; -use OCP\Migration\SimpleMigrationStep; use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; class Version23000Date20210721100600 extends SimpleMigrationStep { /** diff --git a/core/Migrations/Version23000Date20210906132259.php b/core/Migrations/Version23000Date20210906132259.php index d4476a4d36d..fa52f172ece 100644 --- a/core/Migrations/Version23000Date20210906132259.php +++ b/core/Migrations/Version23000Date20210906132259.php @@ -23,24 +23,24 @@ class Version23000Date20210906132259 extends SimpleMigrationStep { * Therefore it was dropped with Version24000Date20211213081506 * and then recreated with a primary key in Version24000Date20211213081604 */ -// /** @var ISchemaWrapper $schema */ -// $schema = $schemaClosure(); -// -// $hasTable = $schema->hasTable(self::TABLE_NAME); -// -// if (!$hasTable) { -// $table = $schema->createTable(self::TABLE_NAME); -// $table->addColumn('hash', Types::STRING, [ -// 'notnull' => true, -// 'length' => 128, -// ]); -// $table->addColumn('delete_after', Types::DATETIME, [ -// 'notnull' => true, -// ]); -// $table->addIndex(['hash'], 'ratelimit_hash'); -// $table->addIndex(['delete_after'], 'ratelimit_delete_after'); -// return $schema; -// } + // /** @var ISchemaWrapper $schema */ + // $schema = $schemaClosure(); + // + // $hasTable = $schema->hasTable(self::TABLE_NAME); + // + // if (!$hasTable) { + // $table = $schema->createTable(self::TABLE_NAME); + // $table->addColumn('hash', Types::STRING, [ + // 'notnull' => true, + // 'length' => 128, + // ]); + // $table->addColumn('delete_after', Types::DATETIME, [ + // 'notnull' => true, + // ]); + // $table->addIndex(['hash'], 'ratelimit_hash'); + // $table->addIndex(['delete_after'], 'ratelimit_delete_after'); + // return $schema; + // } return null; } diff --git a/core/ajax/update.php b/core/ajax/update.php index bc7d8b67fc6..a826b6b7e7a 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -30,12 +30,6 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ -use OCP\EventDispatcher\Event; -use OCP\EventDispatcher\IEventDispatcher; -use OCP\IEventSource; -use OCP\IEventSourceFactory; -use OCP\IL10N; -use OCP\ILogger; use OC\DB\MigratorExecuteSqlEvent; use OC\Repair\Events\RepairAdvanceEvent; use OC\Repair\Events\RepairErrorEvent; @@ -44,6 +38,12 @@ use OC\Repair\Events\RepairInfoEvent; use OC\Repair\Events\RepairStartEvent; use OC\Repair\Events\RepairStepEvent; use OC\Repair\Events\RepairWarningEvent; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventDispatcher; +use OCP\IEventSource; +use OCP\IEventSourceFactory; +use OCP\IL10N; +use OCP\ILogger; use OCP\L10N\IFactory; if (!str_contains(@ini_get('disable_functions'), 'set_time_limit')) { diff --git a/core/templates/publicshareauth.php b/core/templates/publicshareauth.php index c3089a2e143..a48bbbbb7b2 100644 --- a/core/templates/publicshareauth.php +++ b/core/templates/publicshareauth.php @@ -1,10 +1,10 @@ <?php - /** @var array $_ */ - /** @var \OCP\IL10N $l */ - \OCP\Util::addStyle('core', 'guest'); - \OCP\Util::addStyle('core', 'publicshareauth'); - \OCP\Util::addScript('core', 'publicshareauth'); - ?> +/** @var array $_ */ +/** @var \OCP\IL10N $l */ +\OCP\Util::addStyle('core', 'guest'); +\OCP\Util::addStyle('core', 'publicshareauth'); +\OCP\Util::addScript('core', 'publicshareauth'); +?> <div class="guest-box"> <!-- password prompt form. It should be hidden when we show the email prompt form --> |