Move remaining classes to PSR-4

This commit is contained in:
Joas Schilling 2016-05-13 11:56:47 +02:00
parent 4576891f10
commit f14dff680d
No known key found for this signature in database
GPG Key ID: 70A0B324C41C0946
47 changed files with 47 additions and 52 deletions

View File

@ -22,8 +22,8 @@
namespace OCA\Files_External\Command;
use OC\Core\Command\Base;
use OCA\Files_external\Lib\StorageConfig;
use OCA\Files_external\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\GlobalStoragesService;
use OCP\IGroupManager;
use OCP\IUserManager;

View File

@ -22,8 +22,8 @@
namespace OCA\Files_External\Command;
use OC\Core\Command\Base;
use OCA\Files_external\Lib\StorageConfig;
use OCA\Files_external\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\GlobalStoragesService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;

View File

@ -27,7 +27,7 @@ use OC\User\NoUserException;
use OCA\Files_External\Lib\Auth\AuthMechanism;
use OCA\Files_External\Lib\Backend\Backend;
use OCA\Files_External\Lib\DefinitionParameter;
use OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Service\BackendService;
use OCA\Files_External\Service\GlobalStoragesService;
use OCA\Files_External\Service\UserStoragesService;

View File

@ -22,7 +22,7 @@
namespace OCA\Files_External\Command;
use OC\Core\Command\Base;
use OCA\Files_external\NotFoundException;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\GlobalStoragesService;
use OCA\Files_External\Service\UserStoragesService;
use OCP\IUserManager;

View File

@ -23,7 +23,7 @@ namespace OCA\Files_External\Command;
use OC\Core\Command\Base;
use OC\User\NoUserException;
use OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Service\BackendService;
use OCA\Files_External\Service\GlobalStoragesService;
use OCA\Files_External\Service\ImportLegacyStoragesService;

View File

@ -23,7 +23,7 @@ namespace OCA\Files_External\Command;
use OC\Core\Command\Base;
use OC\User\NoUserException;
use OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Service\GlobalStoragesService;
use OCA\Files_External\Service\UserStoragesService;
use OCP\IUserManager;

View File

@ -21,7 +21,7 @@
namespace OCA\Files_External\Command;
use OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageConfig;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;

View File

@ -25,8 +25,8 @@ use OC\Core\Command\Base;
use OCA\Files_External\Lib\Auth\AuthMechanism;
use OCA\Files_External\Lib\Backend\Backend;
use OCA\Files_External\Lib\InsufficientDataForMeaningfulAnswerException;
use OCA\Files_external\Lib\StorageConfig;
use OCA\Files_external\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\GlobalStoragesService;
use OCP\Files\StorageNotAvailableException;
use Symfony\Component\Console\Input\InputArgument;

View File

@ -30,7 +30,7 @@ use \OCP\IL10N;
use \OCP\AppFramework\Http\DataResponse;
use \OCP\AppFramework\Http;
use OCA\Files_External\Service\GlobalStoragesService;
use \OCA\Files_external\NotFoundException;
use OCA\Files_External\NotFoundException;
/**
* Global storages controller

View File

@ -32,8 +32,8 @@ use \OCP\AppFramework\Http\DataResponse;
use \OCP\AppFramework\Controller;
use \OCP\AppFramework\Http;
use OCA\Files_External\Service\StoragesService;
use \OCA\Files_external\NotFoundException;
use \OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use \OCA\Files_External\Lib\Backend\Backend;
use \OCA\Files_External\Lib\Auth\AuthMechanism;
use \OCP\Files\StorageNotAvailableException;

View File

@ -31,8 +31,8 @@ use \OCP\IL10N;
use \OCP\AppFramework\Http\DataResponse;
use \OCP\AppFramework\Http;
use OCA\Files_External\Service\UserGlobalStoragesService;
use \OCA\Files_external\NotFoundException;
use \OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use \OCA\Files_External\Lib\Backend\Backend;
use OCP\IUserSession;

View File

@ -32,8 +32,8 @@ use \OCP\IL10N;
use \OCP\AppFramework\Http\DataResponse;
use \OCP\AppFramework\Http;
use OCA\Files_External\Service\UserStoragesService;
use \OCA\Files_external\NotFoundException;
use \OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use \OCA\Files_External\Lib\Backend\Backend;
/**

View File

@ -22,8 +22,6 @@
namespace OCA\Files_External\Lib\Auth;
use \OCP\IL10N;
use \OCA\Files_External\Lib\Auth\AuthMechanism;
use \OCA\Files_external\Lib\StorageConfig;
/**
* Builtin authentication mechanism, for legacy backends

View File

@ -22,7 +22,6 @@
namespace OCA\Files_External\Lib\Auth;
use \OCP\IL10N;
use \OCA\Files_external\Lib\StorageConfig;
/**
* Null authentication mechanism

View File

@ -23,7 +23,7 @@
*
*/
namespace OCA\Files_external\Lib;
namespace OCA\Files_External\Lib;
use OCA\Files_External\Lib\Auth\IUserProvided;
use \OCA\Files_External\Lib\Backend\Backend;

View File

@ -19,7 +19,7 @@
*
*/
namespace OCA\Files_external;
namespace OCA\Files_External;
/**
* Storage is not found

View File

@ -24,11 +24,9 @@
namespace OCA\Files_External\Service;
use \OCP\IUserSession;
use \OC\Files\Filesystem;
use \OCA\Files_external\Lib\StorageConfig;
use \OCA\Files_external\NotFoundException;
use \OC\Files\Filesystem;
use OCA\Files_External\Lib\StorageConfig;
/**
* Service class to manage global external storages

View File

@ -21,7 +21,7 @@
namespace OCA\Files_External\Service;
use \OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageConfig;
/**
* Read mount config from legacy mount.json

View File

@ -26,8 +26,8 @@
namespace OCA\Files_External\Service;
use \OC\Files\Filesystem;
use \OCA\Files_external\Lib\StorageConfig;
use \OCA\Files_external\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use \OCA\Files_External\Lib\Backend\Backend;
use \OCA\Files_External\Lib\Auth\AuthMechanism;
use OCP\Files\Config\IUserMountCache;

View File

@ -27,8 +27,8 @@ use OCP\Files\Config\IUserMountCache;
use \OCP\IUserSession;
use \OC\Files\Filesystem;
use \OCA\Files_external\Lib\StorageConfig;
use \OCA\Files_external\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use \OCA\Files_External\Service\BackendService;
use \OCA\Files_External\Service\UserTrait;

View File

@ -33,7 +33,7 @@
*/
use phpseclib\Crypt\AES;
use \OCA\Files_External\Appinfo\Application;
use \OCA\Files_External\AppInfo\Application;
use \OCA\Files_External\Lib\Backend\LegacyBackend;
use \OCA\Files_External\Lib\StorageConfig;
use \OCA\Files_External\Lib\Backend\Backend;
@ -91,7 +91,7 @@ class OC_Mount_Config {
$userStoragesService->setUser($user);
foreach ($userGlobalStoragesService->getStorages() as $storage) {
/** @var \OCA\Files_external\Lib\StorageConfig $storage */
/** @var \OCA\Files_External\Lib\StorageConfig $storage */
$mountPoint = '/'.$uid.'/files'.$storage->getMountPoint();
$mountEntry = self::prepareMountPointEntry($storage, false);
foreach ($mountEntry['options'] as &$option) {

View File

@ -35,7 +35,7 @@ use OCA\Files_External\Lib\Storage\AmazonS3;
*
* @package OCA\Files_External\Tests
*/
class AmazonS3Migration extends \Test\TestCase {
class AmazonS3MigrationTest extends \Test\TestCase {
/**
* @var \OC\Files\Storage\Storage instance

View File

@ -21,8 +21,8 @@
namespace OCA\Files_External\Tests\Command;
use OCA\Files_external\Lib\StorageConfig;
use OCA\Files_external\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Input\Input;

View File

@ -26,7 +26,7 @@ use OCA\Files_External\Lib\Auth\NullMechanism;
use OCA\Files_External\Lib\Auth\Password\Password;
use OCA\Files_External\Lib\Auth\Password\SessionCredentials;
use OCA\Files_External\Lib\Backend\Local;
use OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageConfig;
use Symfony\Component\Console\Output\BufferedOutput;
class ListCommandTest extends CommandTest {

View File

@ -25,8 +25,8 @@ use \OCP\AppFramework\Http;
use \OCA\Files_External\Controller\GlobalStoragesController;
use \OCA\Files_External\Service\GlobalStoragesService;
use \OCA\Files_external\Lib\StorageConfig;
use \OCA\Files_external\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
abstract class StoragesControllerTest extends \Test\TestCase {

View File

@ -32,7 +32,7 @@ namespace OCA\Files_External\Tests;
*
* @package OCA\Files_External\Tests
*/
class OwnCloudFunctions extends \Test\TestCase {
class OwnCloudFunctionsTest extends \Test\TestCase {
function configUrlProvider() {
return array(

View File

@ -19,7 +19,7 @@
*
*/
namespace OCA\Files_external\Tests;
namespace OCA\Files_External\Tests;
use OC\Files\Mount\Manager;
use OCA\Files_External\Lib\PersonalMount;

View File

@ -24,8 +24,8 @@ namespace OCA\Files_External\Tests\Service;
use \OC\Files\Filesystem;
use \OCA\Files_external\NotFoundException;
use \OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Lib\StorageConfig;
use OCA\Files_External\Service\BackendService;
use OCA\Files_External\Service\DBConfigService;
use OCA\Files_External\Service\StoragesService;
@ -241,7 +241,7 @@ abstract class StoragesServiceTest extends \Test\TestCase {
/**
* @expectedException \OCA\Files_external\NotFoundException
* @expectedException \OCA\Files_External\NotFoundException
*/
public function testNonExistingStorage() {
$backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB');
@ -324,7 +324,7 @@ abstract class StoragesServiceTest extends \Test\TestCase {
}
/**
* @expectedException \OCA\Files_external\NotFoundException
* @expectedException \OCA\Files_External\NotFoundException
*/
public function testDeleteUnexistingStorage() {
$this->service->removeStorage(255);

View File

@ -22,7 +22,7 @@
*/
namespace OCA\Files_External\Tests\Service;
use OCA\Files_external\NotFoundException;
use OCA\Files_External\NotFoundException;
use OCA\Files_External\Service\StoragesService;
use OCA\Files_External\Service\UserGlobalStoragesService;
use OCP\IUser;

View File

@ -27,7 +27,7 @@ use \OC\Files\Filesystem;
use OCA\Files_External\Service\GlobalStoragesService;
use OCA\Files_External\Service\StoragesService;
use OCA\Files_External\Service\UserStoragesService;
use \OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageConfig;
use Test\Traits\UserTrait;
/**
@ -185,7 +185,7 @@ class UserStoragesServiceTest extends StoragesServiceTest {
}
/**
* @expectedException \OCA\Files_external\NotFoundException
* @expectedException \OCA\Files_External\NotFoundException
*/
public function testGetAdminStorage() {
$backend = $this->backendService->getBackend('identifier:\OCA\Files_External\Lib\Backend\SMB');
@ -200,7 +200,7 @@ class UserStoragesServiceTest extends StoragesServiceTest {
$newStorage = $this->globalStoragesService->addStorage($storage);
$this->assertInstanceOf('\OCA\Files_external\Lib\StorageConfig', $this->globalStoragesService->getStorage($newStorage->getId()));
$this->assertInstanceOf('\OCA\Files_External\Lib\StorageConfig', $this->globalStoragesService->getStorage($newStorage->getId()));
$this->service->getStorage($newStorage->getId());
}

View File

@ -21,9 +21,9 @@
*
*/
namespace OCA\Files_external\Tests;
namespace OCA\Files_External\Tests;
use \OCA\Files_external\Lib\StorageConfig;
use OCA\Files_External\Lib\StorageConfig;
class StorageConfigTest extends \Test\TestCase {