Skip to content

Commit

Permalink
fix(CS): Auto-update coding style
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Jun 20, 2024
1 parent 1753938 commit 9d383a5
Show file tree
Hide file tree
Showing 39 changed files with 149 additions and 149 deletions.
2 changes: 1 addition & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
use OCA\EndToEndEncryption\KeyStorage;
use OCA\EndToEndEncryption\Listener\UserDeletedListener;
use OCA\EndToEndEncryption\MetaDataStorage;
use OCA\EndToEndEncryption\Middleware\UserAgentCheckMiddleware;
use OCA\EndToEndEncryption\Middleware\CanUseAppMiddleware;
use OCA\EndToEndEncryption\Middleware\UserAgentCheckMiddleware;
use OCA\Files_Trashbin\Events\MoveToTrashEvent;
use OCA\Files_Versions\Events\CreateVersionEvent;
use OCP\AppFramework\App;
Expand Down
4 changes: 2 additions & 2 deletions lib/BackgroundJob/RollbackBackgroundJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class RollbackBackgroundJob extends TimedJob {
private RollbackService $rollbackService;

public function __construct(IConfig $config,
ITimeFactory $time,
RollbackService $rollbackService) {
ITimeFactory $time,
RollbackService $rollbackService) {
parent::__construct($time);
$this->config = $config;
$this->rollbackService = $rollbackService;
Expand Down
4 changes: 2 additions & 2 deletions lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

namespace OCA\EndToEndEncryption;

use OCP\IUserSession;
use OCP\IUser;
use OCP\Capabilities\ICapability;
use OCP\IUser;
use OCP\IUserSession;

class Capabilities implements ICapability {
private Config $config;
Expand Down
2 changes: 1 addition & 1 deletion lib/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
namespace OCA\EndToEndEncryption;

use OCP\IConfig;
use OCP\IUser;
use OCP\IGroupManager;
use OCP\IUser;

class Config {
private IConfig $config;
Expand Down
2 changes: 1 addition & 1 deletion lib/Connector/Sabre/APlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
*/
namespace OCA\EndToEndEncryption\Connector\Sabre;

use Exception;
use OCA\DAV\Connector\Sabre\Directory;
use OCA\DAV\Connector\Sabre\File;
use OCA\EndToEndEncryption\E2EEnabledPathCache;
Expand All @@ -33,7 +34,6 @@
use Sabre\DAV\INode;
use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin;
use Exception;

abstract class APlugin extends ServerPlugin {
protected ?Server $server = null;
Expand Down
12 changes: 6 additions & 6 deletions lib/Connector/Sabre/LockPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,32 @@

namespace OCA\EndToEndEncryption\Connector\Sabre;

use OCP\AppFramework\Http;
use OCA\DAV\Connector\Sabre\Directory;
use OCA\DAV\Connector\Sabre\Exception\FileLocked;
use OCA\DAV\Connector\Sabre\Exception\Forbidden;
use OCA\DAV\Connector\Sabre\File;
use OCA\DAV\Upload\FutureFile;
use OCA\EndToEndEncryption\E2EEnabledPathCache;
use OCA\EndToEndEncryption\LockManager;
use OCA\EndToEndEncryption\UserAgentManager;
use OCP\AppFramework\Http;
use OCP\Files\IRootFolder;
use OCP\IUserSession;
use Sabre\DAV\Exception\Conflict;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\INode;
use Sabre\DAV\Server;
use Sabre\HTTP\RequestInterface;
use OCA\EndToEndEncryption\E2EEnabledPathCache;

class LockPlugin extends APlugin {
private LockManager $lockManager;
private UserAgentManager $userAgentManager;

public function __construct(IRootFolder $rootFolder,
IUserSession $userSession,
LockManager $lockManager,
UserAgentManager $userAgentManager,
E2EEnabledPathCache $pathCache) {
IUserSession $userSession,
LockManager $lockManager,
UserAgentManager $userAgentManager,
E2EEnabledPathCache $pathCache) {
parent::__construct($rootFolder, $userSession, $pathCache);
$this->lockManager = $lockManager;
$this->userAgentManager = $userAgentManager;
Expand Down
10 changes: 5 additions & 5 deletions lib/Connector/Sabre/PropFindPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

use OCA\DAV\Connector\Sabre\Directory;
use OCA\DAV\Connector\Sabre\Exception\Forbidden;
use OCA\EndToEndEncryption\UserAgentManager;
use OCA\EndToEndEncryption\E2EEnabledPathCache;
use OCA\EndToEndEncryption\UserAgentManager;
use OCP\Files\IRootFolder;
use OCP\IRequest;
use OCP\IUserSession;
Expand All @@ -42,10 +42,10 @@ class PropFindPlugin extends APlugin {
protected ?Server $server = null;

public function __construct(IRootFolder $rootFolder,
IUserSession $userSession,
UserAgentManager $userAgentManager,
IRequest $request,
E2EEnabledPathCache $pathCache) {
IUserSession $userSession,
UserAgentManager $userAgentManager,
IRequest $request,
E2EEnabledPathCache $pathCache) {
parent::__construct($rootFolder, $userSession, $pathCache);
$this->userAgentManager = $userAgentManager;
$this->request = $request;
Expand Down
10 changes: 5 additions & 5 deletions lib/Controller/EncryptionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ class EncryptionController extends OCSController {
private LoggerInterface $logger;

public function __construct(string $AppName,
IRequest $request,
?string $userId,
IMetaDataStorage $metaDataStorage,
EncryptionManager $manager,
LoggerInterface $logger) {
IRequest $request,
?string $userId,
IMetaDataStorage $metaDataStorage,
EncryptionManager $manager,
LoggerInterface $logger) {
parent::__construct($AppName, $request);
$this->userId = $userId;
$this->metaDataStorage = $metaDataStorage;
Expand Down
16 changes: 8 additions & 8 deletions lib/Controller/KeyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

namespace OCA\EndToEndEncryption\Controller;

use BadMethodCallException;
use Exception;
use OCA\EndToEndEncryption\Exceptions\KeyExistsException;
use OCA\EndToEndEncryption\IKeyStorage;
use OCA\EndToEndEncryption\SignatureHandler;
Expand All @@ -43,8 +45,6 @@
use OCP\Files\NotPermittedException;
use OCP\IL10N;
use OCP\IRequest;
use Exception;
use BadMethodCallException;
use Psr\Log\LoggerInterface;

class KeyController extends OCSController {
Expand All @@ -55,12 +55,12 @@ class KeyController extends OCSController {
private IL10N $l10n;

public function __construct(string $AppName,
IRequest $request,
?string $userId,
IKeyStorage $keyStorage,
SignatureHandler $signatureHandler,
LoggerInterface $logger,
IL10N $l10n
IRequest $request,
?string $userId,
IKeyStorage $keyStorage,
SignatureHandler $signatureHandler,
LoggerInterface $logger,
IL10N $l10n
) {
parent::__construct($AppName, $request);
$this->userId = $userId;
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/LockingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@
use OCA\EndToEndEncryption\IMetaDataStorage;
use OCA\EndToEndEncryption\LockManager;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCS\OCSForbiddenException;
use OCP\AppFramework\OCS\OCSNotFoundException;
use OCP\AppFramework\OCSController;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\IL10N;
use OCP\IRequest;
use Psr\Log\LoggerInterface;
use OCP\Share\IManager as ShareManager;
use OCP\AppFramework\OCS\OCSBadRequestException;
use Psr\Log\LoggerInterface;

class LockingController extends OCSController {
private ?string $userId;
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/MetaDataController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
use OCP\Files\NotPermittedException;
use OCP\IL10N;
use OCP\IRequest;
use Psr\Log\LoggerInterface;
use OCP\Share\IManager as ShareManager;
use Psr\Log\LoggerInterface;

class MetaDataController extends OCSController {
private ?string $userId;
Expand Down
6 changes: 3 additions & 3 deletions lib/E2EEPublicShareTemplateProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\Template\PublicTemplateResponse;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\Defaults;
use OCP\Files\FileInfo;
use OCP\Files\NotFoundException;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\Share\IShare;
use OCP\Share\IPublicShareTemplateProvider;
use OCP\AppFramework\Services\IInitialState;
use OCP\Files\FileInfo;
use OCP\Share\IShare;
use OCP\Util;
use Psr\Log\LoggerInterface;

Expand Down
8 changes: 4 additions & 4 deletions lib/E2EEnabledPathCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

namespace OCA\EndToEndEncryption;

use OCP\Files\Node;
use OCP\Files\Storage\IStorage;
use OCP\Files\IHomeStorage;
use OCP\Files\Cache\ICache;
use OCP\Cache\CappedMemoryCache;
use OCP\Files\Cache\ICache;
use OCP\Files\IHomeStorage;
use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\Files\Storage\IStorage;

class E2EEnabledPathCache {
/**
Expand Down
12 changes: 6 additions & 6 deletions lib/EncryptionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@

namespace OCA\EndToEndEncryption;

use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\Files\Node;
use OCP\Files\NotFoundException;
use OCP\IDBConnection;
use OCP\IUserSession;
use OCP\Share\IManager;
use OCP\Share\IShare;
use OCP\IDBConnection;
use OCP\DB\QueryBuilder\IQueryBuilder;
use Psr\Log\LoggerInterface;

/**
Expand All @@ -50,10 +50,10 @@ class EncryptionManager {
private LoggerInterface $logger;

public function __construct(IRootFolder $rootFolder,
IUserSession $userSession,
IManager $shareManager,
IDBConnection $dbConnection,
LoggerInterface $logger) {
IUserSession $userSession,
IManager $shareManager,
IDBConnection $dbConnection,
LoggerInterface $logger) {
$this->rootFolder = $rootFolder;
$this->userSession = $userSession;
$this->shareManager = $shareManager;
Expand Down
2 changes: 1 addition & 1 deletion lib/Exceptions/FileLockedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Throwable;

class FileLockedException extends Exception {
public function __construct(string $message = 'File is locked', int $code = 0, Throwable $previous = null) {
public function __construct(string $message = 'File is locked', int $code = 0, ?Throwable $previous = null) {
parent::__construct($message, $code, $previous);
}
}
2 changes: 1 addition & 1 deletion lib/Exceptions/FileNotLockedException.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Throwable;

class FileNotLockedException extends Exception {
public function __construct(string $message = 'File is not locked', int $code = 0, Throwable $previous = null) {
public function __construct(string $message = 'File is not locked', int $code = 0, ?Throwable $previous = null) {
parent::__construct($message, $code, $previous);
}
}
2 changes: 1 addition & 1 deletion lib/Exceptions/KeyExistsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class KeyExistsException extends Exception {
* @param int $code
* @param Throwable|null $previous
*/
public function __construct(string $message = 'key already exists', int $code = 0, Throwable $previous = null) {
public function __construct(string $message = 'key already exists', int $code = 0, ?Throwable $previous = null) {
parent::__construct($message, $code, $previous);
}
}
2 changes: 1 addition & 1 deletion lib/Exceptions/MetaDataExistsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MetaDataExistsException extends Exception {
* @param int $code
* @param Throwable|null $previous
*/
public function __construct(string $message = 'meta data file already exists', int $code = 0, Throwable $previous = null) {
public function __construct(string $message = 'meta data file already exists', int $code = 0, ?Throwable $previous = null) {
parent::__construct($message, $code, $previous);
}
}
2 changes: 1 addition & 1 deletion lib/Exceptions/MissingMetaDataException.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class MissingMetaDataException extends Exception {
* @param int $code
* @param Throwable|null $previous
*/
public function __construct(string $message = 'can\'t find meta data file', int $code = 0, Throwable $previous = null) {
public function __construct(string $message = 'can\'t find meta data file', int $code = 0, ?Throwable $previous = null) {
parent::__construct($message, $code, $previous);
}
}
2 changes: 1 addition & 1 deletion lib/KeyStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class KeyStorage implements IKeyStorage {
private string $publicKeysRoot = '/public-keys';

public function __construct(IAppData $appData,
IUserSession $userSession) {
IUserSession $userSession) {
$this->appData = $appData;
$this->userSession = $userSession;
}
Expand Down
8 changes: 4 additions & 4 deletions lib/LockManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ class LockManager {
private ITimeFactory $timeFactory;

public function __construct(LockMapper $lockMapper,
ISecureRandom $secureRandom,
IRootFolder $rootFolder,
IUserSession $userSession,
ITimeFactory $timeFactory
ISecureRandom $secureRandom,
IRootFolder $rootFolder,
IUserSession $userSession,
ITimeFactory $timeFactory
) {
$this->lockMapper = $lockMapper;
$this->secureRandom = $secureRandom;
Expand Down
2 changes: 1 addition & 1 deletion lib/MetaDataStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class MetaDataStorage implements IMetaDataStorage {
private string $intermediateMetaDataFileName = 'intermediate.meta.data';

public function __construct(IAppData $appData,
IRootFolder $rootFolder) {
IRootFolder $rootFolder) {
$this->appData = $appData;
$this->rootFolder = $rootFolder;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/Middleware/CanUseAppMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
use OCA\EndToEndEncryption\Middleware\Exceptions\CanNotUseAppException;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Http\RedirectToDefaultAppResponse;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Middleware;
use OCP\AppFramework\OCS\OCSException;
use OCP\AppFramework\OCSController;
Expand All @@ -42,8 +42,8 @@ class CanUseAppMiddleware extends Middleware {
private Config $config;

public function __construct(IUserSession $userSession,
IControllerMethodReflector $reflector,
Config $config) {
IControllerMethodReflector $reflector,
Config $config) {
$this->userSession = $userSession;
$this->reflector = $reflector;
$this->config = $config;
Expand Down
4 changes: 2 additions & 2 deletions lib/Middleware/UserAgentCheckMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class UserAgentCheckMiddleware extends Middleware {
private UserAgentManager $userAgentManager;

public function __construct(IControllerMethodReflector $reflector,
IRequest $request,
UserAgentManager $userAgentManager) {
IRequest $request,
UserAgentManager $userAgentManager) {
$this->reflector = $reflector;
$this->request = $request;
$this->userAgentManager = $userAgentManager;
Expand Down
2 changes: 1 addition & 1 deletion lib/Migration/Version1005Date20200312102456.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
use OCP\DB\Types;

/**
* Class Version1005Date20200312102456
Expand Down
Loading

0 comments on commit 9d383a5

Please sign in to comment.