diff --git a/.php_cs.dist b/.php_cs.dist index 5bc525b..1a5c05c 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -4,10 +4,18 @@ declare(strict_types=1); require_once './vendor/autoload.php'; -use Nextcloud\CodingStandard\Config; +use Nextcloud\CodingStandard\Config as NextcloudConfig; +use PhpCsFixer\Config; +$nextcloudConfig = new NextcloudConfig(); $config = new Config(); + +$rules = $nextcloudConfig->getRules(); +$rules['ordered_imports'] = ['sort_algorithm' => 'alpha']; + $config + ->setIndent("\t") + ->setRules($rules) ->getFinder() ->ignoreVCSIgnored(true) ->notPath('build') diff --git a/lib/Activity/MeetingListener.php b/lib/Activity/MeetingListener.php index c76e758..323a8c5 100644 --- a/lib/Activity/MeetingListener.php +++ b/lib/Activity/MeetingListener.php @@ -2,13 +2,13 @@ namespace OCA\BigBlueButton\Activity; +use OCA\BigBlueButton\AppInfo\Application; +use OCA\BigBlueButton\Event\MeetingEndedEvent; +use OCA\BigBlueButton\Event\MeetingStartedEvent; +use OCA\BigBlueButton\Event\RecordingReadyEvent; +use OCP\Activity\IManager as IActivityManager; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; -use OCP\Activity\IManager as IActivityManager; -use OCA\BigBlueButton\Event\MeetingStartedEvent; -use OCA\BigBlueButton\Event\MeetingEndedEvent; -use OCA\BigBlueButton\Event\RecordingReadyEvent; -use OCA\BigBlueButton\AppInfo\Application; use OCP\IUserSession; class MeetingListener implements IEventListener { diff --git a/lib/Activity/Provider.php b/lib/Activity/Provider.php index 267c192..e8ac13c 100644 --- a/lib/Activity/Provider.php +++ b/lib/Activity/Provider.php @@ -4,15 +4,15 @@ namespace OCA\BigBlueButton\Activity; use OCA\BigBlueButton\AppInfo\Application; use OCA\BigBlueButton\Db\RoomShare; -use OCP\Activity\IProvider; use OCP\Activity\IEvent; use OCP\Activity\IManager; -use OCP\IL10N; -use OCP\IUserManager; +use OCP\Activity\IProvider; use OCP\IGroupManager; +use OCP\IL10N; use OCP\IURLGenerator; -use OCP\L10N\IFactory; use OCP\IUser; +use OCP\IUserManager; +use OCP\L10N\IFactory; class Provider implements IProvider { diff --git a/lib/Activity/RoomListener.php b/lib/Activity/RoomListener.php index 1c49187..2efcfc7 100644 --- a/lib/Activity/RoomListener.php +++ b/lib/Activity/RoomListener.php @@ -2,12 +2,12 @@ namespace OCA\BigBlueButton\Activity; -use OCP\EventDispatcher\Event; -use OCP\EventDispatcher\IEventListener; -use OCP\Activity\IManager as IActivityManager; +use OCA\BigBlueButton\AppInfo\Application; use OCA\BigBlueButton\Event\RoomCreatedEvent; use OCA\BigBlueButton\Event\RoomDeletedEvent; -use OCA\BigBlueButton\AppInfo\Application; +use OCP\Activity\IManager as IActivityManager; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; class RoomListener implements IEventListener { diff --git a/lib/Activity/RoomShareListener.php b/lib/Activity/RoomShareListener.php index 2cb891e..4dbdff7 100644 --- a/lib/Activity/RoomShareListener.php +++ b/lib/Activity/RoomShareListener.php @@ -2,16 +2,16 @@ namespace OCA\BigBlueButton\Activity; -use OCP\EventDispatcher\Event; -use OCP\EventDispatcher\IEventListener; -use OCP\Activity\IManager as IActivityManager; -use OCP\IGroupManager; -use OCA\BigBlueButton\Event\RoomShareCreatedEvent; -use OCA\BigBlueButton\Event\RoomShareDeletedEvent; use OCA\BigBlueButton\AppInfo\Application; use OCA\BigBlueButton\Db\Room; use OCA\BigBlueButton\Db\RoomShare; +use OCA\BigBlueButton\Event\RoomShareCreatedEvent; +use OCA\BigBlueButton\Event\RoomShareDeletedEvent; use OCA\BigBlueButton\Service\RoomService; +use OCP\Activity\IManager as IActivityManager; +use OCP\EventDispatcher\Event; +use OCP\EventDispatcher\IEventListener; +use OCP\IGroupManager; class RoomShareListener implements IEventListener { diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 9944908..2a90d80 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -2,22 +2,22 @@ namespace OCA\BigBlueButton\AppInfo; -use \OCP\IConfig; -use \OCP\Settings\IManager as ISettingsManager; -use \OCP\AppFramework\App; -use \OCP\EventDispatcher\IEventDispatcher; -use \OCA\BigBlueButton\Middleware\JoinMiddleware; -use \OCA\BigBlueButton\Middleware\HookMiddleware; +use \OCA\BigBlueButton\Activity\MeetingListener; +use \OCA\BigBlueButton\Activity\RoomListener; +use \OCA\BigBlueButton\Activity\RoomShareListener; +use \OCA\BigBlueButton\Event\MeetingEndedEvent; +use \OCA\BigBlueButton\Event\MeetingStartedEvent; +use \OCA\BigBlueButton\Event\RecordingReadyEvent; use \OCA\BigBlueButton\Event\RoomCreatedEvent; use \OCA\BigBlueButton\Event\RoomDeletedEvent; -use \OCA\BigBlueButton\Activity\RoomListener; use \OCA\BigBlueButton\Event\RoomShareCreatedEvent; use \OCA\BigBlueButton\Event\RoomShareDeletedEvent; -use \OCA\BigBlueButton\Activity\RoomShareListener; -use \OCA\BigBlueButton\Event\MeetingStartedEvent; -use \OCA\BigBlueButton\Event\MeetingEndedEvent; -use \OCA\BigBlueButton\Event\RecordingReadyEvent; -use \OCA\BigBlueButton\Activity\MeetingListener; +use \OCA\BigBlueButton\Middleware\HookMiddleware; +use \OCA\BigBlueButton\Middleware\JoinMiddleware; +use \OCP\AppFramework\App; +use \OCP\EventDispatcher\IEventDispatcher; +use \OCP\IConfig; +use \OCP\Settings\IManager as ISettingsManager; if ((@include_once __DIR__ . '/../../vendor/autoload.php') === false) { throw new \Exception('Cannot include autoload. Did you run install dependencies using composer?'); diff --git a/lib/BigBlueButton/API.php b/lib/BigBlueButton/API.php index f197845..01a9251 100644 --- a/lib/BigBlueButton/API.php +++ b/lib/BigBlueButton/API.php @@ -3,21 +3,21 @@ namespace OCA\BigBlueButton\BigBlueButton; use BigBlueButton\BigBlueButton; -use BigBlueButton\Parameters\CreateMeetingParameters; -use BigBlueButton\Parameters\JoinMeetingParameters; -use BigBlueButton\Parameters\GetRecordingsParameters; use BigBlueButton\Core\Record; +use BigBlueButton\Parameters\CreateMeetingParameters; use BigBlueButton\Parameters\DeleteRecordingsParameters; +use BigBlueButton\Parameters\GetRecordingsParameters; use BigBlueButton\Parameters\IsMeetingRunningParameters; -use OCP\EventDispatcher\IEventDispatcher; -use OCA\BigBlueButton\Event\MeetingStartedEvent; -use OCA\BigBlueButton\Db\Room; -use OCA\BigBlueButton\Permission; +use BigBlueButton\Parameters\JoinMeetingParameters; use OCA\BigBlueButton\Crypto; +use OCA\BigBlueButton\Db\Room; +use OCA\BigBlueButton\Event\MeetingStartedEvent; +use OCA\BigBlueButton\Permission; use OCA\BigBlueButton\UrlHelper; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; -use OCP\IURLGenerator; use OCP\IL10N; +use OCP\IURLGenerator; class API { /** @var IConfig */ diff --git a/lib/Controller/Errors.php b/lib/Controller/Errors.php index 1027a4d..7606dc0 100644 --- a/lib/Controller/Errors.php +++ b/lib/Controller/Errors.php @@ -4,12 +4,12 @@ namespace OCA\BigBlueButton\Controller; use Closure; use Exception; -use OCP\AppFramework\Http; -use OCP\AppFramework\Http\DataResponse; - use OCA\BigBlueButton\Service\RoomNotFound; use OCA\BigBlueButton\Service\RoomShareNotFound; +use OCP\AppFramework\Http; +use OCP\AppFramework\Http\DataResponse; + trait Errors { protected function handleNotFound(Closure $callback): DataResponse { try { diff --git a/lib/Controller/HookController.php b/lib/Controller/HookController.php index 8364324..857092a 100644 --- a/lib/Controller/HookController.php +++ b/lib/Controller/HookController.php @@ -3,12 +3,12 @@ namespace OCA\BigBlueButton\Controller; use OCA\BigBlueButton\Db\Room; -use OCP\IRequest; -use OCP\EventDispatcher\IEventDispatcher; -use OCA\BigBlueButton\Service\RoomService; use OCA\BigBlueButton\Event\MeetingEndedEvent; use OCA\BigBlueButton\Event\RecordingReadyEvent; +use OCA\BigBlueButton\Service\RoomService; use OCP\AppFramework\Controller; +use OCP\EventDispatcher\IEventDispatcher; +use OCP\IRequest; class HookController extends Controller { /** @var string */ diff --git a/lib/Controller/JoinController.php b/lib/Controller/JoinController.php index 97f0034..e721a80 100644 --- a/lib/Controller/JoinController.php +++ b/lib/Controller/JoinController.php @@ -8,13 +8,13 @@ use OCA\BigBlueButton\Db\Room; use OCA\BigBlueButton\NoPermissionException; use OCA\BigBlueButton\NotFoundException; use OCA\BigBlueButton\Permission; +use OCA\BigBlueButton\Service\RoomService; +use OCP\AppFramework\Controller; use OCP\AppFramework\Http\RedirectResponse; +use OCP\AppFramework\Http\TemplateResponse; use OCP\IRequest; use OCP\IURLGenerator; use OCP\IUserSession; -use OCA\BigBlueButton\Service\RoomService; -use OCP\AppFramework\Controller; -use OCP\AppFramework\Http\TemplateResponse; class JoinController extends Controller { /** @var string */ diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 49e95f1..01d8d88 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -2,10 +2,10 @@ namespace OCA\BigBlueButton\Controller; -use OCP\IRequest; -use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Controller; +use OCP\AppFramework\Http\TemplateResponse; use OCP\IConfig; +use OCP\IRequest; class PageController extends Controller { /** @var IConfig */ diff --git a/lib/Controller/RestrictionController.php b/lib/Controller/RestrictionController.php index a5090f2..5b4c13f 100644 --- a/lib/Controller/RestrictionController.php +++ b/lib/Controller/RestrictionController.php @@ -3,14 +3,14 @@ namespace OCA\BigBlueButton\Controller; use OCA\BigBlueButton\Db\Restriction; -use OCP\IRequest; -use OCP\IGroupManager; -use OCP\IUserManager; +use OCA\BigBlueButton\Service\RestrictionService; +use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; -use OCP\AppFramework\Controller; +use OCP\IGroupManager; +use OCP\IRequest; -use OCA\BigBlueButton\Service\RestrictionService; +use OCP\IUserManager; class RestrictionController extends Controller { /** @var RestrictionService */ diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index ab2dfec..4e80ba8 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -2,15 +2,15 @@ namespace OCA\BigBlueButton\Controller; -use OCA\BigBlueButton\Service\RoomService; -use OCA\BigBlueButton\Permission; -use OCA\BigBlueButton\Db\Room; use OCA\BigBlueButton\CircleHelper; -use OCP\IRequest; +use OCA\BigBlueButton\Db\Room; +use OCA\BigBlueButton\Permission; +use OCA\BigBlueButton\Service\RoomService; +use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; -use OCP\AppFramework\Controller; use OCP\IGroupManager; +use OCP\IRequest; use OCP\IUserManager; class RoomController extends Controller { diff --git a/lib/Controller/RoomShareController.php b/lib/Controller/RoomShareController.php index db69397..21ae39e 100644 --- a/lib/Controller/RoomShareController.php +++ b/lib/Controller/RoomShareController.php @@ -2,16 +2,16 @@ namespace OCA\BigBlueButton\Controller; +use OCA\BigBlueButton\CircleHelper; use OCA\BigBlueButton\Db\RoomShare; use OCA\BigBlueButton\Service\RoomService; use OCA\BigBlueButton\Service\RoomShareNotFound; -use OCA\BigBlueButton\CircleHelper; -use OCP\IRequest; +use OCA\BigBlueButton\Service\RoomShareService; +use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; -use OCP\AppFramework\Controller; -use OCA\BigBlueButton\Service\RoomShareService; +use OCP\IRequest; use OCP\IUserManager; class RoomShareController extends Controller { diff --git a/lib/Controller/ServerController.php b/lib/Controller/ServerController.php index f7552b6..a0d075d 100644 --- a/lib/Controller/ServerController.php +++ b/lib/Controller/ServerController.php @@ -4,12 +4,12 @@ namespace OCA\BigBlueButton\Controller; use OCA\BigBlueButton\BigBlueButton\API; use OCA\BigBlueButton\Permission; -use OCP\IRequest; +use OCA\BigBlueButton\Service\RoomService; +use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; -use OCP\AppFramework\Controller; -use OCA\BigBlueButton\Service\RoomService; +use OCP\IRequest; class ServerController extends Controller { /** @var RoomService */ diff --git a/lib/Event/RoomEvent.php b/lib/Event/RoomEvent.php index 7e2f6ee..64331cb 100644 --- a/lib/Event/RoomEvent.php +++ b/lib/Event/RoomEvent.php @@ -2,8 +2,8 @@ namespace OCA\BigBlueButton\Event; -use OCP\EventDispatcher\Event; use OCA\BigBlueButton\Db\Room; +use OCP\EventDispatcher\Event; abstract class RoomEvent extends Event { diff --git a/lib/Event/RoomShareEvent.php b/lib/Event/RoomShareEvent.php index af9264a..c6ec959 100644 --- a/lib/Event/RoomShareEvent.php +++ b/lib/Event/RoomShareEvent.php @@ -2,8 +2,8 @@ namespace OCA\BigBlueButton\Event; -use OCP\EventDispatcher\Event; use OCA\BigBlueButton\Db\RoomShare; +use OCP\EventDispatcher\Event; abstract class RoomShareEvent extends Event { diff --git a/lib/Middleware/HookMiddleware.php b/lib/Middleware/HookMiddleware.php index e0749fc..0591d38 100644 --- a/lib/Middleware/HookMiddleware.php +++ b/lib/Middleware/HookMiddleware.php @@ -3,11 +3,11 @@ namespace OCA\BigBlueButton\Middleware; use OCA\BigBlueButton\Controller\HookController; +use OCA\BigBlueButton\Crypto; use OCA\BigBlueButton\NoPermissionException; use OCA\BigBlueButton\NotFoundException; -use OCA\BigBlueButton\Crypto; -use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Middleware; use OCP\IRequest; diff --git a/lib/Migration/Version000000Date20200416124731.php b/lib/Migration/Version000000Date20200416124731.php index e4eb013..4ddfbbb 100644 --- a/lib/Migration/Version000000Date20200416124731.php +++ b/lib/Migration/Version000000Date20200416124731.php @@ -6,8 +6,8 @@ namespace OCA\BigBlueButton\Migration; use Closure; use OCP\DB\ISchemaWrapper; -use OCP\Migration\SimpleMigrationStep; use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; class Version000000Date20200416124731 extends SimpleMigrationStep { diff --git a/lib/NoPermissionResponse.php b/lib/NoPermissionResponse.php index 5e4e102..d238b2a 100644 --- a/lib/NoPermissionResponse.php +++ b/lib/NoPermissionResponse.php @@ -2,9 +2,9 @@ namespace OCA\BigBlueButton; -use OCP\Template; -use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\ContentSecurityPolicy; +use OCP\AppFramework\Http\Response; +use OCP\Template; class NoPermissionResponse extends Response { public function __construct() { diff --git a/lib/NotFoundResponse.php b/lib/NotFoundResponse.php index b3e42dd..815932c 100644 --- a/lib/NotFoundResponse.php +++ b/lib/NotFoundResponse.php @@ -2,9 +2,9 @@ namespace OCA\BigBlueButton; -use OCP\Template; -use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\ContentSecurityPolicy; +use OCP\AppFramework\Http\Response; +use OCP\Template; class NotFoundResponse extends Response { public function __construct() { diff --git a/lib/Permission.php b/lib/Permission.php index 475b140..20a7741 100644 --- a/lib/Permission.php +++ b/lib/Permission.php @@ -3,14 +3,14 @@ namespace OCA\BigBlueButton; use Closure; -use OCA\BigBlueButton\Service\RoomService; -use OCA\BigBlueButton\Service\RestrictionService; -use OCA\BigBlueButton\Service\RoomShareService; +use OCA\BigBlueButton\Db\Restriction; use OCA\BigBlueButton\Db\Room; use OCA\BigBlueButton\Db\RoomShare; -use OCA\BigBlueButton\Db\Restriction; -use OCP\IUserManager; +use OCA\BigBlueButton\Service\RestrictionService; +use OCA\BigBlueButton\Service\RoomService; +use OCA\BigBlueButton\Service\RoomShareService; use OCP\IGroupManager; +use OCP\IUserManager; class Permission { diff --git a/lib/Service/RestrictionService.php b/lib/Service/RestrictionService.php index 7670c42..7e888c4 100644 --- a/lib/Service/RestrictionService.php +++ b/lib/Service/RestrictionService.php @@ -4,12 +4,12 @@ namespace OCA\BigBlueButton\Service; use Exception; -use OCP\AppFramework\Db\DoesNotExistException; -use OCP\AppFramework\Db\MultipleObjectsReturnedException; - use OCA\BigBlueButton\Db\Restriction; use OCA\BigBlueButton\Db\RestrictionMapper; +use OCP\AppFramework\Db\DoesNotExistException; +use OCP\AppFramework\Db\MultipleObjectsReturnedException; + class RestrictionService { /** @var RestrictionMapper */ private $mapper; diff --git a/lib/Service/RoomService.php b/lib/Service/RoomService.php index ceda7b2..00ea54f 100644 --- a/lib/Service/RoomService.php +++ b/lib/Service/RoomService.php @@ -4,14 +4,14 @@ namespace OCA\BigBlueButton\Service; use Exception; -use OCP\AppFramework\Db\DoesNotExistException; -use OCP\AppFramework\Db\MultipleObjectsReturnedException; -use OCP\EventDispatcher\IEventDispatcher; - use OCA\BigBlueButton\Db\Room; use OCA\BigBlueButton\Db\RoomMapper; use OCA\BigBlueButton\Event\RoomCreatedEvent; + use OCA\BigBlueButton\Event\RoomDeletedEvent; +use OCP\AppFramework\Db\DoesNotExistException; +use OCP\AppFramework\Db\MultipleObjectsReturnedException; +use OCP\EventDispatcher\IEventDispatcher; class RoomService { diff --git a/lib/Service/RoomShareService.php b/lib/Service/RoomShareService.php index ae932c8..5768237 100644 --- a/lib/Service/RoomShareService.php +++ b/lib/Service/RoomShareService.php @@ -4,14 +4,14 @@ namespace OCA\BigBlueButton\Service; use Exception; -use OCP\AppFramework\Db\DoesNotExistException; -use OCP\AppFramework\Db\MultipleObjectsReturnedException; -use OCP\EventDispatcher\IEventDispatcher; - use OCA\BigBlueButton\Db\RoomShare; use OCA\BigBlueButton\Db\RoomShareMapper; use OCA\BigBlueButton\Event\RoomShareCreatedEvent; + use OCA\BigBlueButton\Event\RoomShareDeletedEvent; +use OCP\AppFramework\Db\DoesNotExistException; +use OCP\AppFramework\Db\MultipleObjectsReturnedException; +use OCP\EventDispatcher\IEventDispatcher; class RoomShareService { diff --git a/lib/Settings/Personal.php b/lib/Settings/Personal.php index b0f416d..9e0527e 100644 --- a/lib/Settings/Personal.php +++ b/lib/Settings/Personal.php @@ -2,10 +2,10 @@ namespace OCA\BigBlueButton\Settings; -use OCP\AppFramework\Http\TemplateResponse; -use OCP\Settings\ISettings; -use OCP\IConfig; use \OCP\IL10N; +use OCP\AppFramework\Http\TemplateResponse; +use OCP\IConfig; +use OCP\Settings\ISettings; class Personal implements ISettings { /** @var IConfig */ diff --git a/tests/Integration/Db/RoomMapperTest.php b/tests/Integration/Db/RoomMapperTest.php index 0a60381..c7ee7b1 100644 --- a/tests/Integration/Db/RoomMapperTest.php +++ b/tests/Integration/Db/RoomMapperTest.php @@ -7,8 +7,8 @@ use OCA\BigBlueButton\Db\Room; use OCA\BigBlueButton\Db\RoomMapper; use OCA\BigBlueButton\Db\RoomShare; use OCA\BigBlueButton\Db\RoomShareMapper; -use PHPUnit\Framework\TestCase; use OCP\IDBConnection; +use PHPUnit\Framework\TestCase; class RoomMapperTest extends TestCase { /** @var IDBConnection */ diff --git a/tests/Integration/Service/RestrictionServiceTest.php b/tests/Integration/Service/RestrictionServiceTest.php index b49cd44..5adcd3d 100644 --- a/tests/Integration/Service/RestrictionServiceTest.php +++ b/tests/Integration/Service/RestrictionServiceTest.php @@ -5,8 +5,8 @@ namespace OCA\BigBlueButton\Tests\Integration\Service; use OC; use OCA\BigBlueButton\Db\RestrictionMapper; use OCA\BigBlueButton\Service\RestrictionService; -use PHPUnit\Framework\TestCase; use OCP\IDBConnection; +use PHPUnit\Framework\TestCase; class RestrictionServiceTest extends TestCase { /** @var IDBConnection */ diff --git a/tests/Unit/Controller/JoinControllerTest.php b/tests/Unit/Controller/JoinControllerTest.php index d5edb37..701f721 100644 --- a/tests/Unit/Controller/JoinControllerTest.php +++ b/tests/Unit/Controller/JoinControllerTest.php @@ -2,20 +2,20 @@ namespace OCA\BigBlueButton\Tests\Controller; -use PHPUnit\Framework\TestCase; -use OCP\AppFramework\Http\RedirectResponse; -use OCP\IURLGenerator; -use OCP\IUserSession; -use OCP\IRequest; -use OCP\IUser; -use OCA\BigBlueButton\Service\RoomService; -use OCA\BigBlueButton\Controller\JoinController; use OCA\BigBlueButton\BigBlueButton\API; -use OCA\BigBlueButton\NotFoundException; +use OCA\BigBlueButton\Controller\JoinController; use OCA\BigBlueButton\Db\Room; +use OCA\BigBlueButton\NotFoundException; use OCA\BigBlueButton\Permission; +use OCA\BigBlueButton\Service\RoomService; use OCP\AppFramework\Http; +use OCP\AppFramework\Http\RedirectResponse; use OCP\AppFramework\Http\TemplateResponse; +use OCP\IRequest; +use OCP\IURLGenerator; +use OCP\IUser; +use OCP\IUserSession; +use PHPUnit\Framework\TestCase; class JoinControllerTest extends TestCase { private $request; diff --git a/tests/Unit/Controller/RoomShareControllerTest.php b/tests/Unit/Controller/RoomShareControllerTest.php index e91243e..afd75e2 100644 --- a/tests/Unit/Controller/RoomShareControllerTest.php +++ b/tests/Unit/Controller/RoomShareControllerTest.php @@ -2,16 +2,16 @@ namespace OCA\BigBlueButton\Tests\Controller; -use PHPUnit\Framework\TestCase; -use OCP\IRequest; -use OCA\BigBlueButton\Service\RoomService; +use OCA\BigBlueButton\CircleHelper; use OCA\BigBlueButton\Controller\RoomShareController; use OCA\BigBlueButton\Db\Room; use OCA\BigBlueButton\Db\RoomShare; +use OCA\BigBlueButton\Service\RoomService; use OCA\BigBlueButton\Service\RoomShareService; -use OCA\BigBlueButton\CircleHelper; use OCP\AppFramework\Http; +use OCP\IRequest; use OCP\IUserManager; +use PHPUnit\Framework\TestCase; class RoomShareControllerTest extends TestCase { private $request; diff --git a/tests/Unit/PermissionTest.php b/tests/Unit/PermissionTest.php index 288fafe..09129c5 100644 --- a/tests/Unit/PermissionTest.php +++ b/tests/Unit/PermissionTest.php @@ -2,17 +2,17 @@ namespace OCA\BigBlueButton\Tests; +use OCA\BigBlueButton\CircleHelper; +use OCA\BigBlueButton\Db\Restriction; use OCA\BigBlueButton\Db\Room; use OCA\BigBlueButton\Db\RoomShare; -use OCA\BigBlueButton\Db\Restriction; use OCA\BigBlueButton\Permission; +use OCA\BigBlueButton\Service\RestrictionService; use OCA\BigBlueButton\Service\RoomService; use OCA\BigBlueButton\Service\RoomShareService; -use OCA\BigBlueButton\Service\RestrictionService; -use OCA\BigBlueButton\CircleHelper; -use OCP\IUserManager; use OCP\IGroupManager; use OCP\IUser; +use OCP\IUserManager; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; diff --git a/tests/Unit/Service/RestrictionServiceTest.php b/tests/Unit/Service/RestrictionServiceTest.php index baba3f3..c0584df 100644 --- a/tests/Unit/Service/RestrictionServiceTest.php +++ b/tests/Unit/Service/RestrictionServiceTest.php @@ -2,13 +2,13 @@ namespace OCA\BigBlueButton\Tests\Unit\Service; -use PHPUnit\Framework\TestCase; - - -use OCA\BigBlueButton\Service\RestrictionService; -use OCA\BigBlueButton\Db\Room; use OCA\BigBlueButton\Db\Restriction; + + use OCA\BigBlueButton\Db\RestrictionMapper; +use OCA\BigBlueButton\Db\Room; +use OCA\BigBlueButton\Service\RestrictionService; +use PHPUnit\Framework\TestCase; class RestrictionServiceTest extends TestCase { protected $mapper;