Skip to content

Commit

Permalink
chore: Run composer cs:fix to align codebase with current Nextcloud…
Browse files Browse the repository at this point in the history
… coding standards

Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Oct 9, 2023
1 parent d60f784 commit 0005a24
Show file tree
Hide file tree
Showing 283 changed files with 900 additions and 900 deletions.
2 changes: 1 addition & 1 deletion build/integration/features/bootstrap/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
*
*/
use GuzzleHttp\Client;
use GuzzleHttp\Cookie\CookieJar;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\ServerException;
use GuzzleHttp\Cookie\CookieJar;

require __DIR__ . '/../../vendor/autoload.php';

Expand Down
14 changes: 7 additions & 7 deletions build/integration/features/bootstrap/Sharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,13 @@ public function updatingLastShare($body) {
}

public function createShare($user,
$path = null,
$shareType = null,
$shareWith = null,
$publicUpload = null,
$password = null,
$permissions = null,
$viewOnly = false) {
$path = null,
$shareType = null,
$shareWith = null,
$publicUpload = null,
$password = null,
$permissions = null,
$viewOnly = false) {
$fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v{$this->sharingApiVersion}/shares";
$client = new Client();
$options = [
Expand Down
2 changes: 1 addition & 1 deletion core/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
use OCP\Files\Events\Node\NodeDeletedEvent;
use OCP\Files\Events\Node\NodeWrittenEvent;
use OCP\Files\Events\NodeRemovedFromCache;
use OCP\IConfig;
use OCP\User\Events\BeforeUserDeletedEvent;
use OCP\User\Events\UserDeletedEvent;
use OCP\Util;
use OCP\IConfig;

/**
* Class Application
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Broadcast/Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
private $uid;

public function __construct(string $name,
string $uid) {
string $uid) {
parent::__construct();
$this->name = $name;
$this->uid = $uid;
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Db/AddMissingIndices.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
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;

/**
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Db/ConvertFilecacheBigInt.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@

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;
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Db/ConvertType.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
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;
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Info/FileUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
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;
Expand All @@ -38,7 +39,6 @@
use OCP\Share\IShare;
use OCP\Util;
use Symfony\Component\Console\Output\OutputInterface;
use OCP\Files\Folder;

class FileUtils {
public function __construct(
Expand Down
8 changes: 4 additions & 4 deletions core/Command/Maintenance/Repair.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@
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;
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;
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Maintenance/RepairShareOwnership.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@

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;
Expand Down
2 changes: 1 addition & 1 deletion core/Command/Preview/Generate.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
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;
Expand Down
2 changes: 1 addition & 1 deletion core/Command/TwoFactorAuth/Enforce.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
*/
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(
Expand Down
2 changes: 1 addition & 1 deletion core/Command/TwoFactorAuth/State.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private function filterEnabledDisabledUnknownProviders(array $providerStates): a
}

private function printProviders(string $title, array $providers,
OutputInterface $output) {
OutputInterface $output) {
if (empty($providers)) {
// Ignore and don't print anything
return;
Expand Down
8 changes: 4 additions & 4 deletions core/Command/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -48,6 +44,10 @@
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;
Expand Down
2 changes: 1 addition & 1 deletion core/Command/User/AuthTokens/Delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion core/Command/User/AuthTokens/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions core/Controller/ClientFlowLoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ public function showAuthPickerPage(string $clientIdentifier = '', string $user =
*/
#[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();
}
Expand Down Expand Up @@ -233,7 +233,7 @@ public function grantPage(string $stateToken = '',
*/
#[UseSession]
public function generateAppPassword(string $stateToken,
string $clientIdentifier = '') {
string $clientIdentifier = '') {
if (!$this->isValidToken($stateToken)) {
$this->session->remove(self::STATE_NAME);
return $this->stateTokenForbiddenResponse();
Expand Down
10 changes: 5 additions & 5 deletions core/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,11 @@ private function generateRedirect(?string $redirectUrl): RedirectResponse {
*/
#[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
Expand Down
14 changes: 7 additions & 7 deletions core/Controller/LostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -54,14 +60,8 @@
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;
Expand Down
2 changes: 1 addition & 1 deletion core/Controller/ProfileApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
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;
Expand All @@ -37,7 +38,6 @@
use OCP\IRequest;
use OCP\IUserManager;
use OCP\IUserSession;
use OC\Profile\ProfileManager;

class ProfileApiController extends OCSController {
public function __construct(
Expand Down
6 changes: 3 additions & 3 deletions core/Controller/ProfilePageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@
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\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;

#[IgnoreOpenAPI]
class ProfilePageController extends Controller {
Expand Down
2 changes: 1 addition & 1 deletion core/Controller/ReferenceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@

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;
Expand Down
4 changes: 2 additions & 2 deletions core/Controller/TextProcessingApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
use OCP\Common\Exception\NotFoundException;
use OCP\IL10N;
use OCP\IRequest;
use OCP\PreConditionNotMetException;
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;
Expand Down
12 changes: 6 additions & 6 deletions core/Controller/UnifiedSearchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
use OC\Search\SearchComposer;
use OC\Search\SearchQuery;
use OCA\Core\ResponseDefinitions;
use OCP\AppFramework\OCSController;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUserSession;
Expand Down Expand Up @@ -95,11 +95,11 @@ public function getProviders(string $from = ''): DataResponse {
* 400: Searching is not possible
*/
public function search(string $providerId,
string $term = '',
?int $sortOrder = null,
?int $limit = null,
$cursor = null,
string $from = ''): DataResponse {
string $term = '',
?int $sortOrder = null,
?int $limit = null,
$cursor = null,
string $from = ''): DataResponse {
if (trim($term) === "") {
return new DataResponse(null, Http::STATUS_BAD_REQUEST);
}
Expand Down
4 changes: 2 additions & 2 deletions core/Db/ProfileConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@

namespace OC\Core\Db;

use function Safe\json_decode;
use function Safe\json_encode;
use \JsonSerializable;
use OCP\Accounts\IAccountManager;
use OCP\AppFramework\Db\Entity;
use OCP\Profile\ParameterDoesNotExistException;
use function Safe\json_decode;
use function Safe\json_encode;

/**
* @method string getUserId()
Expand Down
Loading

0 comments on commit 0005a24

Please sign in to comment.