From 20e4f64025d088021df1d52c8692eea14e31a9f7 Mon Sep 17 00:00:00 2001 From: Daniel Klabbers Date: Wed, 10 Feb 2016 11:00:37 +0100 Subject: [PATCH] reordering and removing unused imports --- .../core/src/Admin/AdminServiceProvider.php | 6 ++--- framework/core/src/Admin/Server.php | 2 +- framework/core/src/Api/ApiServiceProvider.php | 2 +- framework/core/src/Api/Client.php | 7 +++-- .../AbstractSerializeController.php | 4 +-- .../Controller/CreateDiscussionController.php | 2 +- .../Controller/ForgotPasswordController.php | 2 +- .../Controller/ListDiscussionsController.php | 4 +-- .../ListNotificationsController.php | 2 +- .../Api/Controller/ListUsersController.php | 2 +- .../Api/Controller/SetSettingsController.php | 4 +-- .../src/Api/Controller/TokenController.php | 2 +- .../Controller/UpdateExtensionController.php | 1 - .../Handler/ModelNotFoundExceptionHandler.php | 1 - .../src/Api/Serializer/AbstractSerializer.php | 8 +++--- .../Api/Serializer/DiscussionSerializer.php | 2 +- .../src/Api/Serializer/ForumSerializer.php | 2 +- .../Api/Serializer/PostBasicSerializer.php | 2 +- framework/core/src/Asset/AssetManager.php | 1 - framework/core/src/Asset/RevisionCompiler.php | 2 -- framework/core/src/Core/Access/Gate.php | 4 +-- framework/core/src/Core/AuthToken.php | 4 +-- .../src/Core/Command/CreateGroupHandler.php | 2 +- .../src/Core/Command/DeleteAvatarHandler.php | 2 +- .../core/src/Core/Command/DeleteGroup.php | 1 - .../src/Core/Command/DeleteGroupHandler.php | 2 +- .../src/Core/Command/DeletePostHandler.php | 2 +- .../src/Core/Command/DeleteUserHandler.php | 2 +- framework/core/src/Core/Command/EditGroup.php | 1 - .../src/Core/Command/EditGroupHandler.php | 2 +- .../core/src/Core/Command/EditPostHandler.php | 4 +-- .../core/src/Core/Command/EditUserHandler.php | 8 +++--- .../src/Core/Command/PostReplyHandler.php | 8 +++--- .../src/Core/Command/RegisterUserHandler.php | 7 +++-- framework/core/src/Core/DiscussionState.php | 4 +-- framework/core/src/Core/EmailToken.php | 4 +-- framework/core/src/Core/Guest.php | 2 -- framework/core/src/Core/Post.php | 7 +++-- framework/core/src/Core/Post/CommentPost.php | 11 ++++---- .../src/Core/Post/RegisteredTypesScope.php | 2 +- framework/core/src/Core/User.php | 26 +++++++++---------- .../core/src/Database/AbstractMigration.php | 2 +- .../core/src/Database/MigrationCreator.php | 2 +- framework/core/src/Database/Migrator.php | 4 +-- .../core/src/Event/ConfigureClientView.php | 4 +-- .../core/src/Event/ConfigureMiddleware.php | 4 +-- .../core/src/Event/ConfigureUserSearch.php | 2 +- .../core/src/Event/ScopeModelVisibility.php | 2 +- .../core/src/Extension/ExtensionManager.php | 2 +- framework/core/src/Formatter/Formatter.php | 6 ++--- .../Forum/AuthenticationResponseFactory.php | 1 - framework/core/src/Forum/Server.php | 2 +- .../core/src/Foundation/AbstractServer.php | 1 - framework/core/src/Foundation/Application.php | 6 ++--- framework/core/src/Http/AbstractServer.php | 2 +- .../src/Install/InstallServiceProvider.php | 5 ++-- .../core/src/Update/UpdateServiceProvider.php | 2 +- 57 files changed, 96 insertions(+), 114 deletions(-) diff --git a/framework/core/src/Admin/AdminServiceProvider.php b/framework/core/src/Admin/AdminServiceProvider.php index 69f5c28a1..5b2b340dc 100644 --- a/framework/core/src/Admin/AdminServiceProvider.php +++ b/framework/core/src/Admin/AdminServiceProvider.php @@ -10,14 +10,12 @@ namespace Flarum\Admin; -use Flarum\Event\SettingWasSet; use Flarum\Event\ExtensionWasDisabled; use Flarum\Event\ExtensionWasEnabled; -use Flarum\Http\RouteCollection; +use Flarum\Event\SettingWasSet; use Flarum\Foundation\AbstractServiceProvider; use Flarum\Http\GenerateRouteHandlerTrait; -use Psr\Http\Message\ServerRequestInterface; -use Zend\Diactoros\Response\RedirectResponse; +use Flarum\Http\RouteCollection; class AdminServiceProvider extends AbstractServiceProvider { diff --git a/framework/core/src/Admin/Server.php b/framework/core/src/Admin/Server.php index dc5ac9504..8d560ab5c 100644 --- a/framework/core/src/Admin/Server.php +++ b/framework/core/src/Admin/Server.php @@ -14,8 +14,8 @@ namespace Flarum\Admin; use Flarum\Event\ConfigureMiddleware; use Flarum\Foundation\Application; use Flarum\Http\AbstractServer; -use Zend\Stratigility\MiddlewarePipe; use Flarum\Http\Middleware\HandleErrors; +use Zend\Stratigility\MiddlewarePipe; class Server extends AbstractServer { diff --git a/framework/core/src/Api/ApiServiceProvider.php b/framework/core/src/Api/ApiServiceProvider.php index acd114fdf..b45d443e0 100644 --- a/framework/core/src/Api/ApiServiceProvider.php +++ b/framework/core/src/Api/ApiServiceProvider.php @@ -15,9 +15,9 @@ use Flarum\Api\Serializer\AbstractSerializer; use Flarum\Api\Serializer\NotificationSerializer; use Flarum\Event\ConfigureApiRoutes; use Flarum\Event\ConfigureNotificationTypes; +use Flarum\Foundation\AbstractServiceProvider; use Flarum\Http\GenerateRouteHandlerTrait; use Flarum\Http\RouteCollection; -use Flarum\Foundation\AbstractServiceProvider; use Tobscure\JsonApi\ErrorHandler; use Tobscure\JsonApi\Exception\Handler\FallbackExceptionHandler; use Tobscure\JsonApi\Exception\Handler\InvalidParameterExceptionHandler; diff --git a/framework/core/src/Api/Client.php b/framework/core/src/Api/Client.php index c1db8e1f1..e798526ce 100644 --- a/framework/core/src/Api/Client.php +++ b/framework/core/src/Api/Client.php @@ -10,11 +10,10 @@ namespace Flarum\Api; -use Flarum\Http\Controller\ControllerInterface; -use Flarum\Core\User; -use Flarum\Http\AccessToken; -use Illuminate\Contracts\Container\Container; use Exception; +use Flarum\Core\User; +use Flarum\Http\Controller\ControllerInterface; +use Illuminate\Contracts\Container\Container; use InvalidArgumentException; use Zend\Diactoros\ServerRequestFactory; diff --git a/framework/core/src/Api/Controller/AbstractSerializeController.php b/framework/core/src/Api/Controller/AbstractSerializeController.php index 48d35717e..72d765671 100644 --- a/framework/core/src/Api/Controller/AbstractSerializeController.php +++ b/framework/core/src/Api/Controller/AbstractSerializeController.php @@ -11,10 +11,10 @@ namespace Flarum\Api\Controller; use Flarum\Api\JsonApiResponse; -use Flarum\Http\Controller\ControllerInterface; -use Illuminate\Contracts\Container\Container; use Flarum\Event\ConfigureApiController; use Flarum\Event\PrepareApiData; +use Flarum\Http\Controller\ControllerInterface; +use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Events\Dispatcher; use Psr\Http\Message\ServerRequestInterface; use Tobscure\JsonApi\Document; diff --git a/framework/core/src/Api/Controller/CreateDiscussionController.php b/framework/core/src/Api/Controller/CreateDiscussionController.php index 7af48d8c9..0f4fb949a 100644 --- a/framework/core/src/Api/Controller/CreateDiscussionController.php +++ b/framework/core/src/Api/Controller/CreateDiscussionController.php @@ -10,8 +10,8 @@ namespace Flarum\Api\Controller; -use Flarum\Core\Command\StartDiscussion; use Flarum\Core\Command\ReadDiscussion; +use Flarum\Core\Command\StartDiscussion; use Flarum\Core\Post\Floodgate; use Illuminate\Contracts\Bus\Dispatcher; use Psr\Http\Message\ServerRequestInterface; diff --git a/framework/core/src/Api/Controller/ForgotPasswordController.php b/framework/core/src/Api/Controller/ForgotPasswordController.php index 74f20491b..d4744be64 100644 --- a/framework/core/src/Api/Controller/ForgotPasswordController.php +++ b/framework/core/src/Api/Controller/ForgotPasswordController.php @@ -10,8 +10,8 @@ namespace Flarum\Api\Controller; -use Flarum\Core\Repository\UserRepository; use Flarum\Core\Command\RequestPasswordReset; +use Flarum\Core\Repository\UserRepository; use Flarum\Http\Controller\ControllerInterface; use Illuminate\Contracts\Bus\Dispatcher; use Psr\Http\Message\ServerRequestInterface; diff --git a/framework/core/src/Api/Controller/ListDiscussionsController.php b/framework/core/src/Api/Controller/ListDiscussionsController.php index a40ef8a68..bdd15eca8 100644 --- a/framework/core/src/Api/Controller/ListDiscussionsController.php +++ b/framework/core/src/Api/Controller/ListDiscussionsController.php @@ -10,9 +10,9 @@ namespace Flarum\Api\Controller; -use Flarum\Core\Search\SearchCriteria; -use Flarum\Core\Search\Discussion\DiscussionSearcher; use Flarum\Api\UrlGenerator; +use Flarum\Core\Search\Discussion\DiscussionSearcher; +use Flarum\Core\Search\SearchCriteria; use Psr\Http\Message\ServerRequestInterface; use Tobscure\JsonApi\Document; diff --git a/framework/core/src/Api/Controller/ListNotificationsController.php b/framework/core/src/Api/Controller/ListNotificationsController.php index 861c0b655..bf8b0ad84 100644 --- a/framework/core/src/Api/Controller/ListNotificationsController.php +++ b/framework/core/src/Api/Controller/ListNotificationsController.php @@ -11,8 +11,8 @@ namespace Flarum\Api\Controller; use Flarum\Core\Discussion; -use Flarum\Core\Repository\NotificationRepository; use Flarum\Core\Exception\PermissionDeniedException; +use Flarum\Core\Repository\NotificationRepository; use Psr\Http\Message\ServerRequestInterface; use Tobscure\JsonApi\Document; diff --git a/framework/core/src/Api/Controller/ListUsersController.php b/framework/core/src/Api/Controller/ListUsersController.php index e9c9fe48f..5966359a3 100644 --- a/framework/core/src/Api/Controller/ListUsersController.php +++ b/framework/core/src/Api/Controller/ListUsersController.php @@ -10,9 +10,9 @@ namespace Flarum\Api\Controller; +use Flarum\Api\UrlGenerator; use Flarum\Core\Search\SearchCriteria; use Flarum\Core\Search\User\UserSearcher; -use Flarum\Api\UrlGenerator; use Psr\Http\Message\ServerRequestInterface; use Tobscure\JsonApi\Document; diff --git a/framework/core/src/Api/Controller/SetSettingsController.php b/framework/core/src/Api/Controller/SetSettingsController.php index 418184b4e..d829639f5 100644 --- a/framework/core/src/Api/Controller/SetSettingsController.php +++ b/framework/core/src/Api/Controller/SetSettingsController.php @@ -11,10 +11,10 @@ namespace Flarum\Api\Controller; use Flarum\Core\Access\AssertPermissionTrait; +use Flarum\Event\PrepareSerializedSetting; +use Flarum\Event\SettingWasSet; use Flarum\Http\Controller\ControllerInterface; use Flarum\Settings\SettingsRepositoryInterface; -use Flarum\Event\SettingWasSet; -use Flarum\Event\PrepareSerializedSetting; use Illuminate\Contracts\Events\Dispatcher; use Psr\Http\Message\ServerRequestInterface; use Zend\Diactoros\Response\EmptyResponse; diff --git a/framework/core/src/Api/Controller/TokenController.php b/framework/core/src/Api/Controller/TokenController.php index 9eb198a50..f6e4428e0 100644 --- a/framework/core/src/Api/Controller/TokenController.php +++ b/framework/core/src/Api/Controller/TokenController.php @@ -12,8 +12,8 @@ namespace Flarum\Api\Controller; use Flarum\Core\Exception\PermissionDeniedException; use Flarum\Core\Repository\UserRepository; -use Flarum\Http\Controller\ControllerInterface; use Flarum\Http\AccessToken; +use Flarum\Http\Controller\ControllerInterface; use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher; use Illuminate\Contracts\Events\Dispatcher as EventDispatcher; use Psr\Http\Message\ServerRequestInterface; diff --git a/framework/core/src/Api/Controller/UpdateExtensionController.php b/framework/core/src/Api/Controller/UpdateExtensionController.php index e5227a6f5..716dc8108 100644 --- a/framework/core/src/Api/Controller/UpdateExtensionController.php +++ b/framework/core/src/Api/Controller/UpdateExtensionController.php @@ -13,7 +13,6 @@ namespace Flarum\Api\Controller; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\Extension\ExtensionManager; use Flarum\Http\Controller\ControllerInterface; -use Illuminate\Contracts\Bus\Dispatcher; use Psr\Http\Message\ServerRequestInterface; class UpdateExtensionController implements ControllerInterface diff --git a/framework/core/src/Api/Handler/ModelNotFoundExceptionHandler.php b/framework/core/src/Api/Handler/ModelNotFoundExceptionHandler.php index 941338631..dba486bbb 100644 --- a/framework/core/src/Api/Handler/ModelNotFoundExceptionHandler.php +++ b/framework/core/src/Api/Handler/ModelNotFoundExceptionHandler.php @@ -11,7 +11,6 @@ namespace Flarum\Api\Handler; use Exception; -use Flarum\Http\Exception\RouteNotFoundException; use Illuminate\Database\Eloquent\ModelNotFoundException; use Tobscure\JsonApi\Exception\Handler\ExceptionHandlerInterface; use Tobscure\JsonApi\Exception\Handler\ResponseBag; diff --git a/framework/core/src/Api/Serializer/AbstractSerializer.php b/framework/core/src/Api/Serializer/AbstractSerializer.php index 5628b920f..c49c48a6f 100644 --- a/framework/core/src/Api/Serializer/AbstractSerializer.php +++ b/framework/core/src/Api/Serializer/AbstractSerializer.php @@ -10,18 +10,18 @@ namespace Flarum\Api\Serializer; -use DateTime; use Closure; +use DateTime; +use Flarum\Api\Relationship\HasManyBuilder; +use Flarum\Api\Relationship\HasOneBuilder; use Flarum\Core\User; -use Flarum\Event\PrepareApiAttributes; use Flarum\Event\GetApiRelationship; +use Flarum\Event\PrepareApiAttributes; use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Events\Dispatcher; use InvalidArgumentException; use LogicException; use Tobscure\JsonApi\AbstractSerializer as BaseAbstractSerializer; -use Flarum\Api\Relationship\HasOneBuilder; -use Flarum\Api\Relationship\HasManyBuilder; use Tobscure\JsonApi\Collection; use Tobscure\JsonApi\Relationship; use Tobscure\JsonApi\Relationship\BuilderInterface; diff --git a/framework/core/src/Api/Serializer/DiscussionSerializer.php b/framework/core/src/Api/Serializer/DiscussionSerializer.php index b12f9df3d..d7d3845b4 100644 --- a/framework/core/src/Api/Serializer/DiscussionSerializer.php +++ b/framework/core/src/Api/Serializer/DiscussionSerializer.php @@ -10,8 +10,8 @@ namespace Flarum\Api\Serializer; -use Flarum\Core\Discussion; use Flarum\Core\Access\Gate; +use Flarum\Core\Discussion; class DiscussionSerializer extends DiscussionBasicSerializer { diff --git a/framework/core/src/Api/Serializer/ForumSerializer.php b/framework/core/src/Api/Serializer/ForumSerializer.php index 4d14f6691..9d1b88cc7 100644 --- a/framework/core/src/Api/Serializer/ForumSerializer.php +++ b/framework/core/src/Api/Serializer/ForumSerializer.php @@ -10,8 +10,8 @@ namespace Flarum\Api\Serializer; -use Flarum\Foundation\Application; use Flarum\Core\Access\Gate; +use Flarum\Foundation\Application; use Flarum\Settings\SettingsRepositoryInterface; class ForumSerializer extends AbstractSerializer diff --git a/framework/core/src/Api/Serializer/PostBasicSerializer.php b/framework/core/src/Api/Serializer/PostBasicSerializer.php index 4ee550615..d4ede57b3 100644 --- a/framework/core/src/Api/Serializer/PostBasicSerializer.php +++ b/framework/core/src/Api/Serializer/PostBasicSerializer.php @@ -10,8 +10,8 @@ namespace Flarum\Api\Serializer; -use Flarum\Core\Post\CommentPost; use Flarum\Core\Post; +use Flarum\Core\Post\CommentPost; use InvalidArgumentException; class PostBasicSerializer extends AbstractSerializer diff --git a/framework/core/src/Asset/AssetManager.php b/framework/core/src/Asset/AssetManager.php index c4fe144f3..fcde2655d 100644 --- a/framework/core/src/Asset/AssetManager.php +++ b/framework/core/src/Asset/AssetManager.php @@ -11,7 +11,6 @@ namespace Flarum\Asset; use DomainException; -use Flarum\Asset\CompilerInterface; class AssetManager { diff --git a/framework/core/src/Asset/RevisionCompiler.php b/framework/core/src/Asset/RevisionCompiler.php index da8f8ffa3..5b256af95 100644 --- a/framework/core/src/Asset/RevisionCompiler.php +++ b/framework/core/src/Asset/RevisionCompiler.php @@ -10,8 +10,6 @@ namespace Flarum\Asset; -use Illuminate\Support\Str; - class RevisionCompiler implements CompilerInterface { /** diff --git a/framework/core/src/Core/Access/Gate.php b/framework/core/src/Core/Access/Gate.php index ccb1baf54..43ac8adab 100644 --- a/framework/core/src/Core/Access/Gate.php +++ b/framework/core/src/Core/Access/Gate.php @@ -2,9 +2,9 @@ namespace Flarum\Core\Access; -use InvalidArgumentException; -use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Auth\Access\Gate as GateContract; +use Illuminate\Contracts\Container\Container; +use InvalidArgumentException; /** * @author Taylor Otwell diff --git a/framework/core/src/Core/AuthToken.php b/framework/core/src/Core/AuthToken.php index 0908aad9a..792a7ed92 100644 --- a/framework/core/src/Core/AuthToken.php +++ b/framework/core/src/Core/AuthToken.php @@ -10,9 +10,9 @@ namespace Flarum\Core; -use Flarum\Database\AbstractModel; -use Flarum\Core\Exception\InvalidConfirmationTokenException; use DateTime; +use Flarum\Core\Exception\InvalidConfirmationTokenException; +use Flarum\Database\AbstractModel; /** * @todo document database columns with @property diff --git a/framework/core/src/Core/Command/CreateGroupHandler.php b/framework/core/src/Core/Command/CreateGroupHandler.php index 1731e06c3..df6a8b603 100644 --- a/framework/core/src/Core/Command/CreateGroupHandler.php +++ b/framework/core/src/Core/Command/CreateGroupHandler.php @@ -13,9 +13,9 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\Core\Exception\PermissionDeniedException; use Flarum\Core\Group; +use Flarum\Core\Support\DispatchEventsTrait; use Flarum\Core\Validator\GroupValidator; use Flarum\Event\GroupWillBeSaved; -use Flarum\Core\Support\DispatchEventsTrait; use Illuminate\Contracts\Events\Dispatcher; class CreateGroupHandler diff --git a/framework/core/src/Core/Command/DeleteAvatarHandler.php b/framework/core/src/Core/Command/DeleteAvatarHandler.php index d452828fb..c607e235e 100644 --- a/framework/core/src/Core/Command/DeleteAvatarHandler.php +++ b/framework/core/src/Core/Command/DeleteAvatarHandler.php @@ -12,9 +12,9 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\Core\Exception\PermissionDeniedException; -use Flarum\Event\AvatarWillBeDeleted; use Flarum\Core\Repository\UserRepository; use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Event\AvatarWillBeDeleted; use Illuminate\Contracts\Events\Dispatcher; use League\Flysystem\FilesystemInterface; diff --git a/framework/core/src/Core/Command/DeleteGroup.php b/framework/core/src/Core/Command/DeleteGroup.php index 1fc564961..5af343dfd 100644 --- a/framework/core/src/Core/Command/DeleteGroup.php +++ b/framework/core/src/Core/Command/DeleteGroup.php @@ -10,7 +10,6 @@ namespace Flarum\Core\Command; -use Flarum\Core\Group; use Flarum\Core\User; class DeleteGroup diff --git a/framework/core/src/Core/Command/DeleteGroupHandler.php b/framework/core/src/Core/Command/DeleteGroupHandler.php index aa5850669..6d69967ea 100644 --- a/framework/core/src/Core/Command/DeleteGroupHandler.php +++ b/framework/core/src/Core/Command/DeleteGroupHandler.php @@ -13,8 +13,8 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\Core\Exception\PermissionDeniedException; use Flarum\Core\Repository\GroupRepository; -use Flarum\Event\GroupWillBeDeleted; use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Event\GroupWillBeDeleted; use Illuminate\Contracts\Events\Dispatcher; class DeleteGroupHandler diff --git a/framework/core/src/Core/Command/DeletePostHandler.php b/framework/core/src/Core/Command/DeletePostHandler.php index 7241afa78..0c8c69931 100644 --- a/framework/core/src/Core/Command/DeletePostHandler.php +++ b/framework/core/src/Core/Command/DeletePostHandler.php @@ -13,8 +13,8 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\Core\Exception\PermissionDeniedException; use Flarum\Core\Repository\PostRepository; -use Flarum\Event\PostWillBeDeleted; use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Event\PostWillBeDeleted; use Illuminate\Contracts\Events\Dispatcher; class DeletePostHandler diff --git a/framework/core/src/Core/Command/DeleteUserHandler.php b/framework/core/src/Core/Command/DeleteUserHandler.php index 746fc9801..e6f40bcfb 100644 --- a/framework/core/src/Core/Command/DeleteUserHandler.php +++ b/framework/core/src/Core/Command/DeleteUserHandler.php @@ -13,8 +13,8 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; use Flarum\Core\Exception\PermissionDeniedException; use Flarum\Core\Repository\UserRepository; -use Flarum\Event\UserWillBeDeleted; use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Event\UserWillBeDeleted; use Illuminate\Contracts\Events\Dispatcher; class DeleteUserHandler diff --git a/framework/core/src/Core/Command/EditGroup.php b/framework/core/src/Core/Command/EditGroup.php index 8d46d2805..cb656e3d1 100644 --- a/framework/core/src/Core/Command/EditGroup.php +++ b/framework/core/src/Core/Command/EditGroup.php @@ -10,7 +10,6 @@ namespace Flarum\Core\Command; -use Flarum\Core\Group; use Flarum\Core\User; class EditGroup diff --git a/framework/core/src/Core/Command/EditGroupHandler.php b/framework/core/src/Core/Command/EditGroupHandler.php index a556d93a3..88acc0913 100644 --- a/framework/core/src/Core/Command/EditGroupHandler.php +++ b/framework/core/src/Core/Command/EditGroupHandler.php @@ -14,9 +14,9 @@ use Flarum\Core\Access\AssertPermissionTrait; use Flarum\Core\Exception\PermissionDeniedException; use Flarum\Core\Group; use Flarum\Core\Repository\GroupRepository; +use Flarum\Core\Support\DispatchEventsTrait; use Flarum\Core\Validator\GroupValidator; use Flarum\Event\GroupWillBeSaved; -use Flarum\Core\Support\DispatchEventsTrait; use Illuminate\Contracts\Events\Dispatcher; class EditGroupHandler diff --git a/framework/core/src/Core/Command/EditPostHandler.php b/framework/core/src/Core/Command/EditPostHandler.php index 9a18d0e0a..a9d9fc71f 100644 --- a/framework/core/src/Core/Command/EditPostHandler.php +++ b/framework/core/src/Core/Command/EditPostHandler.php @@ -11,11 +11,11 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; +use Flarum\Core\Post\CommentPost; use Flarum\Core\Repository\PostRepository; +use Flarum\Core\Support\DispatchEventsTrait; use Flarum\Core\Validator\PostValidator; use Flarum\Event\PostWillBeSaved; -use Flarum\Core\Support\DispatchEventsTrait; -use Flarum\Core\Post\CommentPost; use Illuminate\Contracts\Events\Dispatcher; class EditPostHandler diff --git a/framework/core/src/Core/Command/EditUserHandler.php b/framework/core/src/Core/Command/EditUserHandler.php index 5cdcbb773..33a22c49a 100644 --- a/framework/core/src/Core/Command/EditUserHandler.php +++ b/framework/core/src/Core/Command/EditUserHandler.php @@ -11,12 +11,12 @@ namespace Flarum\Core\Command; use Flarum\Core\Access\AssertPermissionTrait; -use Flarum\Core\User; use Flarum\Core\Repository\UserRepository; -use Flarum\Core\Validator\UserValidator; -use Flarum\Event\UserWillBeSaved; -use Flarum\Event\UserGroupsWereChanged; use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Core\User; +use Flarum\Core\Validator\UserValidator; +use Flarum\Event\UserGroupsWereChanged; +use Flarum\Event\UserWillBeSaved; use Illuminate\Contracts\Events\Dispatcher; class EditUserHandler diff --git a/framework/core/src/Core/Command/PostReplyHandler.php b/framework/core/src/Core/Command/PostReplyHandler.php index ca62b2859..f81645866 100644 --- a/framework/core/src/Core/Command/PostReplyHandler.php +++ b/framework/core/src/Core/Command/PostReplyHandler.php @@ -12,12 +12,12 @@ namespace Flarum\Core\Command; use DateTime; use Flarum\Core\Access\AssertPermissionTrait; +use Flarum\Core\Notification\NotificationSyncer; +use Flarum\Core\Post\CommentPost; +use Flarum\Core\Repository\DiscussionRepository; +use Flarum\Core\Support\DispatchEventsTrait; use Flarum\Core\Validator\PostValidator; use Flarum\Event\PostWillBeSaved; -use Flarum\Core\Repository\DiscussionRepository; -use Flarum\Core\Post\CommentPost; -use Flarum\Core\Support\DispatchEventsTrait; -use Flarum\Core\Notification\NotificationSyncer; use Illuminate\Contracts\Events\Dispatcher; class PostReplyHandler diff --git a/framework/core/src/Core/Command/RegisterUserHandler.php b/framework/core/src/Core/Command/RegisterUserHandler.php index 6e5e0e539..2a46e77b7 100644 --- a/framework/core/src/Core/Command/RegisterUserHandler.php +++ b/framework/core/src/Core/Command/RegisterUserHandler.php @@ -12,19 +12,18 @@ namespace Flarum\Core\Command; use Exception; use Flarum\Core\Access\AssertPermissionTrait; -use Flarum\Core\User; use Flarum\Core\AuthToken; +use Flarum\Core\Exception\PermissionDeniedException; +use Flarum\Core\Support\DispatchEventsTrait; +use Flarum\Core\User; use Flarum\Core\Validator\UserValidator; use Flarum\Event\UserWillBeSaved; -use Flarum\Core\Support\DispatchEventsTrait; use Flarum\Foundation\Application; use Flarum\Settings\SettingsRepositoryInterface; -use Flarum\Core\Exception\PermissionDeniedException; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Validation\Factory; use Illuminate\Contracts\Validation\ValidationException; use Illuminate\Support\Str; -use Illuminate\Validation\Validator; use Intervention\Image\ImageManager; use League\Flysystem\Adapter\Local; use League\Flysystem\Filesystem; diff --git a/framework/core/src/Core/DiscussionState.php b/framework/core/src/Core/DiscussionState.php index 6c66490bf..fede5016a 100644 --- a/framework/core/src/Core/DiscussionState.php +++ b/framework/core/src/Core/DiscussionState.php @@ -10,9 +10,9 @@ namespace Flarum\Core; -use Flarum\Event\DiscussionWasRead; -use Flarum\Database\AbstractModel; use Flarum\Core\Support\EventGeneratorTrait; +use Flarum\Database\AbstractModel; +use Flarum\Event\DiscussionWasRead; use Illuminate\Database\Eloquent\Builder; /** diff --git a/framework/core/src/Core/EmailToken.php b/framework/core/src/Core/EmailToken.php index 5e8bf02ec..adb5341fc 100644 --- a/framework/core/src/Core/EmailToken.php +++ b/framework/core/src/Core/EmailToken.php @@ -10,9 +10,9 @@ namespace Flarum\Core; -use Flarum\Database\AbstractModel; -use Flarum\Core\Exception\InvalidConfirmationTokenException; use DateTime; +use Flarum\Core\Exception\InvalidConfirmationTokenException; +use Flarum\Database\AbstractModel; /** * @todo document database columns with @property diff --git a/framework/core/src/Core/Guest.php b/framework/core/src/Core/Guest.php index 0952b0e80..a0b612ef4 100755 --- a/framework/core/src/Core/Guest.php +++ b/framework/core/src/Core/Guest.php @@ -10,8 +10,6 @@ namespace Flarum\Core; -use Flarum\Core\Group; - class Guest extends User { /** diff --git a/framework/core/src/Core/Post.php b/framework/core/src/Core/Post.php index 857f7e1a8..082c7a8de 100755 --- a/framework/core/src/Core/Post.php +++ b/framework/core/src/Core/Post.php @@ -12,13 +12,12 @@ namespace Flarum\Core; use DomainException; use Flarum\Core\Post\RegisteredTypesScope; -use Flarum\Event\PostWasDeleted; -use Flarum\Database\AbstractModel; -use Flarum\Core\User; +use Flarum\Core\Support\EventGeneratorTrait; use Flarum\Core\Support\Locked; use Flarum\Core\Support\ScopeVisibilityTrait; -use Flarum\Core\Support\EventGeneratorTrait; use Flarum\Core\Support\ValidateBeforeSaveTrait; +use Flarum\Database\AbstractModel; +use Flarum\Event\PostWasDeleted; use Illuminate\Database\Eloquent\Builder; /** diff --git a/framework/core/src/Core/Post/CommentPost.php b/framework/core/src/Core/Post/CommentPost.php index bea521d66..f6950af3c 100755 --- a/framework/core/src/Core/Post/CommentPost.php +++ b/framework/core/src/Core/Post/CommentPost.php @@ -10,14 +10,13 @@ namespace Flarum\Core\Post; -use DomainException; use Flarum\Core\Post; -use Flarum\Formatter\Formatter; -use Flarum\Event\PostWasPosted; -use Flarum\Event\PostWasRevised; -use Flarum\Event\PostWasHidden; -use Flarum\Event\PostWasRestored; use Flarum\Core\User; +use Flarum\Event\PostWasHidden; +use Flarum\Event\PostWasPosted; +use Flarum\Event\PostWasRestored; +use Flarum\Event\PostWasRevised; +use Flarum\Formatter\Formatter; /** * A standard comment in a discussion. diff --git a/framework/core/src/Core/Post/RegisteredTypesScope.php b/framework/core/src/Core/Post/RegisteredTypesScope.php index be7c6d99c..f6bdda4be 100644 --- a/framework/core/src/Core/Post/RegisteredTypesScope.php +++ b/framework/core/src/Core/Post/RegisteredTypesScope.php @@ -10,9 +10,9 @@ namespace Flarum\Core\Post; -use Illuminate\Database\Eloquent\ScopeInterface; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\ScopeInterface; class RegisteredTypesScope implements ScopeInterface { diff --git a/framework/core/src/Core/User.php b/framework/core/src/Core/User.php index 40ad35a0b..2586f10c8 100755 --- a/framework/core/src/Core/User.php +++ b/framework/core/src/Core/User.php @@ -11,26 +11,26 @@ namespace Flarum\Core; use DomainException; -use Flarum\Core\Access\Gate; -use Flarum\Foundation\Application; use Flarum\Core; -use Flarum\Database\AbstractModel; +use Flarum\Core\Access\Gate; use Flarum\Core\Notification; +use Flarum\Core\Support\EventGeneratorTrait; +use Flarum\Core\Support\ScopeVisibilityTrait; +use Flarum\Database\AbstractModel; use Flarum\Event\ConfigureUserPreferences; -use Illuminate\Contracts\Hashing\Hasher; -use Flarum\Event\UserWasDeleted; use Flarum\Event\PostWasDeleted; -use Flarum\Event\UserWasRegistered; -use Flarum\Event\UserWasRenamed; +use Flarum\Event\PrepareUserGroups; +use Flarum\Event\UserAvatarWasChanged; +use Flarum\Event\UserBioWasChanged; +use Flarum\Event\UserEmailChangeWasRequested; use Flarum\Event\UserEmailWasChanged; use Flarum\Event\UserPasswordWasChanged; -use Flarum\Event\UserBioWasChanged; -use Flarum\Event\UserAvatarWasChanged; use Flarum\Event\UserWasActivated; -use Flarum\Event\UserEmailChangeWasRequested; -use Flarum\Event\PrepareUserGroups; -use Flarum\Core\Support\ScopeVisibilityTrait; -use Flarum\Core\Support\EventGeneratorTrait; +use Flarum\Event\UserWasDeleted; +use Flarum\Event\UserWasRegistered; +use Flarum\Event\UserWasRenamed; +use Flarum\Foundation\Application; +use Illuminate\Contracts\Hashing\Hasher; /** * @property int $id diff --git a/framework/core/src/Database/AbstractMigration.php b/framework/core/src/Database/AbstractMigration.php index 1062ee1cb..867f7718d 100644 --- a/framework/core/src/Database/AbstractMigration.php +++ b/framework/core/src/Database/AbstractMigration.php @@ -10,8 +10,8 @@ namespace Flarum\Database; -use Illuminate\Database\Schema\Builder; use Flarum\Settings\SettingsRepositoryInterface; +use Illuminate\Database\Schema\Builder; abstract class AbstractMigration { diff --git a/framework/core/src/Database/MigrationCreator.php b/framework/core/src/Database/MigrationCreator.php index ce871807b..c6b5cdde7 100755 --- a/framework/core/src/Database/MigrationCreator.php +++ b/framework/core/src/Database/MigrationCreator.php @@ -10,8 +10,8 @@ namespace Flarum\Database; -use Illuminate\Support\Str; use Illuminate\Filesystem\Filesystem; +use Illuminate\Support\Str; class MigrationCreator { diff --git a/framework/core/src/Database/Migrator.php b/framework/core/src/Database/Migrator.php index 0b5a0d71f..07d6c7b67 100755 --- a/framework/core/src/Database/Migrator.php +++ b/framework/core/src/Database/Migrator.php @@ -11,9 +11,9 @@ namespace Flarum\Database; -use Illuminate\Support\Str; -use Illuminate\Filesystem\Filesystem; use Illuminate\Database\ConnectionResolverInterface as Resolver; +use Illuminate\Filesystem\Filesystem; +use Illuminate\Support\Str; class Migrator { diff --git a/framework/core/src/Event/ConfigureClientView.php b/framework/core/src/Event/ConfigureClientView.php index 81c7ddc22..4b623ff2c 100644 --- a/framework/core/src/Event/ConfigureClientView.php +++ b/framework/core/src/Event/ConfigureClientView.php @@ -10,10 +10,10 @@ namespace Flarum\Event; -use Flarum\Http\Controller\AbstractClientController; -use Flarum\Http\Controller\ClientView; use Flarum\Admin\Controller\ClientController as AdminClientAction; use Flarum\Forum\Controller\ClientController as ForumClientAction; +use Flarum\Http\Controller\AbstractClientController; +use Flarum\Http\Controller\ClientView; class ConfigureClientView { diff --git a/framework/core/src/Event/ConfigureMiddleware.php b/framework/core/src/Event/ConfigureMiddleware.php index 26f06248b..b6fad6f80 100644 --- a/framework/core/src/Event/ConfigureMiddleware.php +++ b/framework/core/src/Event/ConfigureMiddleware.php @@ -10,9 +10,9 @@ namespace Flarum\Event; -use Flarum\Forum\Server as ForumServer; -use Flarum\Api\Server as ApiServer; use Flarum\Admin\Server as AdminServer; +use Flarum\Api\Server as ApiServer; +use Flarum\Forum\Server as ForumServer; use Flarum\Foundation\AbstractServer; use Zend\Stratigility\MiddlewarePipe; diff --git a/framework/core/src/Event/ConfigureUserSearch.php b/framework/core/src/Event/ConfigureUserSearch.php index 8861fedd6..845c4bf64 100644 --- a/framework/core/src/Event/ConfigureUserSearch.php +++ b/framework/core/src/Event/ConfigureUserSearch.php @@ -10,8 +10,8 @@ namespace Flarum\Event; -use Flarum\Core\Search\User\UserSearch; use Flarum\Core\Search\SearchCriteria; +use Flarum\Core\Search\User\UserSearch; class ConfigureUserSearch { diff --git a/framework/core/src/Event/ScopeModelVisibility.php b/framework/core/src/Event/ScopeModelVisibility.php index 473bc88dc..c2fb735e9 100644 --- a/framework/core/src/Event/ScopeModelVisibility.php +++ b/framework/core/src/Event/ScopeModelVisibility.php @@ -11,8 +11,8 @@ namespace Flarum\Event; use Flarum\Core\User; -use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Eloquent\Model; /** * The `ScopeModelVisibility` event allows constraints to be applied in a query diff --git a/framework/core/src/Extension/ExtensionManager.php b/framework/core/src/Extension/ExtensionManager.php index 68ee7bd99..288400ac9 100644 --- a/framework/core/src/Extension/ExtensionManager.php +++ b/framework/core/src/Extension/ExtensionManager.php @@ -11,12 +11,12 @@ namespace Flarum\Extension; use Flarum\Core; +use Flarum\Database\Migrator; use Flarum\Event\ExtensionWasDisabled; use Flarum\Event\ExtensionWasEnabled; use Flarum\Event\ExtensionWasUninstalled; use Flarum\Foundation\Application; use Flarum\Settings\SettingsRepositoryInterface; -use Flarum\Database\Migrator; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Filesystem\Filesystem; diff --git a/framework/core/src/Formatter/Formatter.php b/framework/core/src/Formatter/Formatter.php index f8b0fb69d..60122204f 100644 --- a/framework/core/src/Formatter/Formatter.php +++ b/framework/core/src/Formatter/Formatter.php @@ -10,13 +10,13 @@ namespace Flarum\Formatter; +use Flarum\Event\ConfigureFormatter; +use Flarum\Event\ConfigureFormatterParser; +use Flarum\Event\ConfigureFormatterRenderer; use Illuminate\Contracts\Cache\Repository; use Illuminate\Contracts\Events\Dispatcher; use s9e\TextFormatter\Configurator; use s9e\TextFormatter\Unparser; -use Flarum\Event\ConfigureFormatter; -use Flarum\Event\ConfigureFormatterParser; -use Flarum\Event\ConfigureFormatterRenderer; class Formatter { diff --git a/framework/core/src/Forum/AuthenticationResponseFactory.php b/framework/core/src/Forum/AuthenticationResponseFactory.php index cd60e8420..c3a008637 100644 --- a/framework/core/src/Forum/AuthenticationResponseFactory.php +++ b/framework/core/src/Forum/AuthenticationResponseFactory.php @@ -12,7 +12,6 @@ namespace Flarum\Forum; use Flarum\Core\AuthToken; use Flarum\Core\User; -use Flarum\Http\AccessToken; use Flarum\Http\Rememberer; use Flarum\Http\SessionAuthenticator; use Psr\Http\Message\ServerRequestInterface as Request; diff --git a/framework/core/src/Forum/Server.php b/framework/core/src/Forum/Server.php index f3285fee8..0ab34b6be 100644 --- a/framework/core/src/Forum/Server.php +++ b/framework/core/src/Forum/Server.php @@ -14,9 +14,9 @@ namespace Flarum\Forum; use Flarum\Event\ConfigureMiddleware; use Flarum\Foundation\Application; use Flarum\Http\AbstractServer; +use Flarum\Http\Middleware\HandleErrors; use Zend\Diactoros\Response\HtmlResponse; use Zend\Stratigility\MiddlewarePipe; -use Flarum\Http\Middleware\HandleErrors; class Server extends AbstractServer { diff --git a/framework/core/src/Foundation/AbstractServer.php b/framework/core/src/Foundation/AbstractServer.php index 6cb669642..fc75a4202 100644 --- a/framework/core/src/Foundation/AbstractServer.php +++ b/framework/core/src/Foundation/AbstractServer.php @@ -10,7 +10,6 @@ namespace Flarum\Foundation; -use Exception; use Flarum\Core; use Illuminate\Config\Repository as ConfigRepository; use Monolog\Formatter\LineFormatter; diff --git a/framework/core/src/Foundation/Application.php b/framework/core/src/Foundation/Application.php index 78c778ee3..a45b79186 100644 --- a/framework/core/src/Foundation/Application.php +++ b/framework/core/src/Foundation/Application.php @@ -10,12 +10,12 @@ namespace Flarum\Foundation; -use Illuminate\Support\Arr; -use Illuminate\Support\ServiceProvider; -use Illuminate\Support\Str; use Illuminate\Container\Container; use Illuminate\Contracts\Foundation\Application as ApplicationContract; use Illuminate\Events\EventServiceProvider; +use Illuminate\Support\Arr; +use Illuminate\Support\ServiceProvider; +use Illuminate\Support\Str; class Application extends Container implements ApplicationContract { diff --git a/framework/core/src/Http/AbstractServer.php b/framework/core/src/Http/AbstractServer.php index a2d5cd5d8..ea69af959 100644 --- a/framework/core/src/Http/AbstractServer.php +++ b/framework/core/src/Http/AbstractServer.php @@ -13,9 +13,9 @@ namespace Flarum\Http; use Flarum\Core\AuthToken; use Flarum\Core\EmailToken; use Flarum\Core\PasswordToken; +use Flarum\Foundation\AbstractServer as BaseAbstractServer; use Flarum\Foundation\Application; use Zend\Diactoros\Server; -use Flarum\Foundation\AbstractServer as BaseAbstractServer; use Zend\Stratigility\MiddlewareInterface; abstract class AbstractServer extends BaseAbstractServer diff --git a/framework/core/src/Install/InstallServiceProvider.php b/framework/core/src/Install/InstallServiceProvider.php index b545fa9d9..03a38f08f 100644 --- a/framework/core/src/Install/InstallServiceProvider.php +++ b/framework/core/src/Install/InstallServiceProvider.php @@ -10,14 +10,13 @@ namespace Flarum\Install; +use Flarum\Foundation\AbstractServiceProvider; use Flarum\Http\GenerateRouteHandlerTrait; use Flarum\Http\RouteCollection; +use Flarum\Install\Prerequisite\Composite; use Flarum\Install\Prerequisite\PhpExtensions; use Flarum\Install\Prerequisite\PhpVersion; use Flarum\Install\Prerequisite\WritablePaths; -use Flarum\Install\Prerequisite\Composite; -use Flarum\Foundation\AbstractServiceProvider; -use Psr\Http\Message\ServerRequestInterface; class InstallServiceProvider extends AbstractServiceProvider { diff --git a/framework/core/src/Update/UpdateServiceProvider.php b/framework/core/src/Update/UpdateServiceProvider.php index 711ec13b1..f225d43d4 100644 --- a/framework/core/src/Update/UpdateServiceProvider.php +++ b/framework/core/src/Update/UpdateServiceProvider.php @@ -10,9 +10,9 @@ namespace Flarum\Update; +use Flarum\Foundation\AbstractServiceProvider; use Flarum\Http\GenerateRouteHandlerTrait; use Flarum\Http\RouteCollection; -use Flarum\Foundation\AbstractServiceProvider; class UpdateServiceProvider extends AbstractServiceProvider {