Skip to content

Commit

Permalink
Run cs:fix
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chemineau <louis@chmn.me>
  • Loading branch information
artonge committed Jan 16, 2024
1 parent 33d0c1d commit f8b8258
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions lib/Controller/LockingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@
use OCA\EndToEndEncryption\LockManager;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCS\OCSForbiddenException;
use OCP\AppFramework\OCS\OCSNotFoundException;
use OCP\AppFramework\OCS\OCSPreconditionFailedException;
use OCP\AppFramework\OCSController;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use OCP\IL10N;
use OCP\IRequest;
use OCP\Share\IManager as ShareManager;
use Psr\Log\LoggerInterface;
use OCP\AppFramework\OCS\OCSPreconditionFailedException;
use OCP\AppFramework\OCS\OCSBadRequestException;

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 @@ -35,10 +35,10 @@
use OCA\EndToEndEncryption\LockManager;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCS\OCSPreconditionFailedException;
use OCP\AppFramework\OCS\OCSBadRequestException;
use OCP\AppFramework\OCS\OCSForbiddenException;
use OCP\AppFramework\OCS\OCSNotFoundException;
use OCP\AppFramework\OCS\OCSPreconditionFailedException;
use OCP\AppFramework\OCSController;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
Expand Down
4 changes: 2 additions & 2 deletions lib/Controller/V1/LockingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@
use OCA\EndToEndEncryption\IMetaDataStorageV1;
use OCA\EndToEndEncryption\LockManagerV1;
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/V1/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
8 changes: 4 additions & 4 deletions lib/LockManagerV1.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ class LockManagerV1 {
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/MetaDataStorageV1.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class MetaDataStorageV1 implements IMetaDataStorageV1 {
private string $intermediateMetaDataFileName = 'intermediate.meta.data';

public function __construct(IAppData $appData,
IRootFolder $rootFolder) {
IRootFolder $rootFolder) {
$this->appData = $appData;
$this->rootFolder = $rootFolder;
}
Expand Down
14 changes: 7 additions & 7 deletions lib/RollbackServiceV1.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
*/
namespace OCA\EndToEndEncryption;

use OCA\EndToEndEncryption\AppInfo\Application;
use OCA\EndToEndEncryption\Db\LockMapper;
use OCP\Files\Config\ICachedMountFileInfo;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Folder;
use OCA\EndToEndEncryption\AppInfo\Application;
use OCA\EndToEndEncryption\Db\LockMapper;
use OCP\Files\IRootFolder;
use Psr\Log\LoggerInterface;

Expand Down Expand Up @@ -55,11 +55,11 @@ class RollbackServiceV1 {
private LoggerInterface $logger;

public function __construct(LockMapper $lockMapper,
IMetaDataStorageV1 $metaDataStorage,
FileService $fileService,
IUserMountCache $userMountCache,
IRootFolder $rootFolder,
LoggerInterface $logger) {
IMetaDataStorageV1 $metaDataStorage,
FileService $fileService,
IUserMountCache $userMountCache,
IRootFolder $rootFolder,
LoggerInterface $logger) {
$this->lockMapper = $lockMapper;
$this->metaDataStorage = $metaDataStorage;
$this->fileService = $fileService;
Expand Down
32 changes: 16 additions & 16 deletions tests/Unit/Controller/MetaDataControllerV1Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
use OCP\Files\NotPermittedException;
use OCP\IL10N;
use OCP\IRequest;
use OCP\Share\IManager as ShareManager;
use Psr\Log\LoggerInterface;
use Test\TestCase;
use OCP\Share\IManager as ShareManager;

class MetaDataControllerV1Test extends TestCase {

Expand Down Expand Up @@ -104,9 +104,9 @@ protected function setUp(): void {
* @dataProvider getMetaDataDataProvider
*/
public function testGetMetaData(?\Exception $metaDataStorageException,
?string $expectedException,
?string $expectedExceptionMessage,
bool $expectLogger): void {
?string $expectedException,
?string $expectedExceptionMessage,
bool $expectLogger): void {
$fileId = 42;
$metaData = 'JSON-ENCODED-META-DATA';
if ($metaDataStorageException) {
Expand Down Expand Up @@ -166,11 +166,11 @@ public function getMetaDataDataProvider(): array {
* @dataProvider setMetaDataDataProvider
*/
public function testSetMetaData(?\Exception $metaDataStorageException,
?string $expectedException,
?string $expectedExceptionMessage,
bool $expectLogger,
?array $expectedResponseData,
?int $expectedResponseCode): void {
?string $expectedException,
?string $expectedExceptionMessage,
bool $expectLogger,
?array $expectedResponseData,
?int $expectedResponseCode): void {
$fileId = 42;
$metaData = 'JSON-ENCODED-META-DATA';
if ($metaDataStorageException) {
Expand Down Expand Up @@ -228,10 +228,10 @@ public function setMetaDataDataProvider(): array {
* @dataProvider updateMetaDataDataProvider
*/
public function testUpdateMetaData(bool $isLocked,
?\Exception $metaDataStorageException,
?string $expectedException,
?string $expectedExceptionMessage,
bool $expectLogger): void {
?\Exception $metaDataStorageException,
?string $expectedException,
?string $expectedExceptionMessage,
bool $expectLogger): void {
$fileId = 42;
$sendToken = 'sendE2EToken';
$metaData = 'JSON-ENCODED-META-DATA';
Expand Down Expand Up @@ -303,9 +303,9 @@ public function updateMetaDataDataProvider(): array {
* @dataProvider deleteMetaDataDataProvider
*/
public function testDeleteMetaData(?\Exception $metaDataStorageException,
?string $expectedException,
?string $expectedExceptionMessage,
bool $expectLogger): void {
?string $expectedException,
?string $expectedExceptionMessage,
bool $expectLogger): void {
$fileId = 42;
if ($metaDataStorageException) {
$this->metaDataStorage->expects($this->once())
Expand Down
12 changes: 6 additions & 6 deletions tests/Unit/MetaDataStorageV1Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

namespace OCA\EndToEndEncryption\Tests\Unit;

use Exception;
use OC\User\NoUserException;
use OCA\EndToEndEncryption\Exceptions\MetaDataExistsException;
use OCA\EndToEndEncryption\Exceptions\MissingMetaDataException;
Expand All @@ -35,7 +36,6 @@
use OCP\Files\SimpleFS\ISimpleFile;
use OCP\Files\SimpleFS\ISimpleFolder;
use Test\TestCase;
use Exception;

class MetaDataStorageV1Test extends TestCase {

Expand Down Expand Up @@ -679,9 +679,9 @@ public function verifyFolderStructureDataProvider(): array {
* @dataProvider getLegacyFileDataProvider
*/
public function testGetLegacyFile(?Exception $legacyOwnerException,
?Exception $getFolderException,
?Exception $getFileException,
bool $expectsNull): void {
?Exception $getFolderException,
?Exception $getFileException,
bool $expectsNull): void {
$metaDataStorage = $this->getMockBuilder(MetaDataStorageV1::class)
->setMethods([
'getLegacyOwnerPath',
Expand Down Expand Up @@ -755,8 +755,8 @@ public function getLegacyFileDataProvider(): array {
* @dataProvider cleanupLegacyFileDataProvider
*/
public function testCleanupLegacyFile(?Exception $legacyOwnerException,
?Exception $getFolderException,
bool $expectsDelete): void {
?Exception $getFolderException,
bool $expectsDelete): void {
$metaDataStorage = $this->getMockBuilder(MetaDataStorageV1::class)
->setMethods([
'getLegacyOwnerPath',
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/RollbackServiceV1Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Folder;
use OCP\Files\IRootFolder;
use Psr\Log\LoggerInterface;
use OCP\IUser;
use Psr\Log\LoggerInterface;
use Test\TestCase;

class RollbackServiceV1Test extends TestCase {
Expand Down

0 comments on commit f8b8258

Please sign in to comment.