diff --git a/framework/core/src/Admin/AdminServiceProvider.php b/framework/core/src/Admin/AdminServiceProvider.php index f394637e2..1166ee120 100644 --- a/framework/core/src/Admin/AdminServiceProvider.php +++ b/framework/core/src/Admin/AdminServiceProvider.php @@ -13,10 +13,10 @@ namespace Flarum\Admin; use Flarum\Extension\Event\Disabled; use Flarum\Extension\Event\Enabled; -use Flarum\Settings\Event\Saved; use Flarum\Foundation\AbstractServiceProvider; -use Flarum\Http\RouteHandlerFactory; use Flarum\Http\RouteCollection; +use Flarum\Http\RouteHandlerFactory; +use Flarum\Settings\Event\Saved; class AdminServiceProvider extends AbstractServiceProvider { diff --git a/framework/core/src/Admin/Controller/FrontendController.php b/framework/core/src/Admin/Controller/FrontendController.php index 14258eb05..a274a3d61 100644 --- a/framework/core/src/Admin/Controller/FrontendController.php +++ b/framework/core/src/Admin/Controller/FrontendController.php @@ -12,10 +12,10 @@ namespace Flarum\Admin\Controller; use Flarum\Admin\Frontend; -use Flarum\Group\Permission; -use Flarum\Settings\Event\Deserializing; use Flarum\Extension\ExtensionManager; use Flarum\Frontend\AbstractFrontendController; +use Flarum\Group\Permission; +use Flarum\Settings\Event\Deserializing; use Flarum\Settings\SettingsRepositoryInterface; use Illuminate\Contracts\Events\Dispatcher; use Psr\Http\Message\ServerRequestInterface; diff --git a/framework/core/src/Admin/routes.php b/framework/core/src/Admin/routes.php index f2a04f74b..eac48ca4e 100644 --- a/framework/core/src/Admin/routes.php +++ b/framework/core/src/Admin/routes.php @@ -10,8 +10,8 @@ */ use Flarum\Admin\Controller; -use Flarum\Http\RouteHandlerFactory; use Flarum\Http\RouteCollection; +use Flarum\Http\RouteHandlerFactory; return function (RouteCollection $map, RouteHandlerFactory $route) { $map->get( diff --git a/framework/core/src/Api/ApiServiceProvider.php b/framework/core/src/Api/ApiServiceProvider.php index 8e524324f..c886b25ec 100644 --- a/framework/core/src/Api/ApiServiceProvider.php +++ b/framework/core/src/Api/ApiServiceProvider.php @@ -17,8 +17,8 @@ use Flarum\Api\Serializer\NotificationSerializer; use Flarum\Event\ConfigureApiRoutes; use Flarum\Event\ConfigureNotificationTypes; use Flarum\Foundation\AbstractServiceProvider; -use Flarum\Http\RouteHandlerFactory; use Flarum\Http\RouteCollection; +use Flarum\Http\RouteHandlerFactory; use Tobscure\JsonApi\ErrorHandler; use Tobscure\JsonApi\Exception\Handler\FallbackExceptionHandler; use Tobscure\JsonApi\Exception\Handler\InvalidParameterExceptionHandler; diff --git a/framework/core/src/Api/Controller/DeleteFaviconController.php b/framework/core/src/Api/Controller/DeleteFaviconController.php index 4c2807abc..887360942 100644 --- a/framework/core/src/Api/Controller/DeleteFaviconController.php +++ b/framework/core/src/Api/Controller/DeleteFaviconController.php @@ -11,9 +11,9 @@ namespace Flarum\Api\Controller; -use Flarum\User\AssertPermissionTrait; use Flarum\Foundation\Application; use Flarum\Settings\SettingsRepositoryInterface; +use Flarum\User\AssertPermissionTrait; use League\Flysystem\Adapter\Local; use League\Flysystem\Filesystem; use Psr\Http\Message\ServerRequestInterface; diff --git a/framework/core/src/Api/Controller/DeleteLogoController.php b/framework/core/src/Api/Controller/DeleteLogoController.php index 532674577..50a76c658 100644 --- a/framework/core/src/Api/Controller/DeleteLogoController.php +++ b/framework/core/src/Api/Controller/DeleteLogoController.php @@ -11,9 +11,9 @@ namespace Flarum\Api\Controller; -use Flarum\User\AssertPermissionTrait; use Flarum\Foundation\Application; use Flarum\Settings\SettingsRepositoryInterface; +use Flarum\User\AssertPermissionTrait; use League\Flysystem\Adapter\Local; use League\Flysystem\Filesystem; use Psr\Http\Message\ServerRequestInterface; diff --git a/framework/core/src/Api/Controller/ForgotPasswordController.php b/framework/core/src/Api/Controller/ForgotPasswordController.php index 56e638878..341f16d34 100644 --- a/framework/core/src/Api/Controller/ForgotPasswordController.php +++ b/framework/core/src/Api/Controller/ForgotPasswordController.php @@ -11,9 +11,9 @@ namespace Flarum\Api\Controller; +use Flarum\Http\Controller\ControllerInterface; use Flarum\User\Command\RequestPasswordReset; use Flarum\User\UserRepository; -use Flarum\Http\Controller\ControllerInterface; use Illuminate\Contracts\Bus\Dispatcher; use Psr\Http\Message\ServerRequestInterface; use Zend\Diactoros\Response\EmptyResponse; diff --git a/framework/core/src/Api/Controller/ListNotificationsController.php b/framework/core/src/Api/Controller/ListNotificationsController.php index aeca867a8..d86922b42 100644 --- a/framework/core/src/Api/Controller/ListNotificationsController.php +++ b/framework/core/src/Api/Controller/ListNotificationsController.php @@ -12,8 +12,8 @@ namespace Flarum\Api\Controller; use Flarum\Discussion\Discussion; -use Flarum\User\Exception\PermissionDeniedException; use Flarum\Notification\NotificationRepository; +use Flarum\User\Exception\PermissionDeniedException; use Psr\Http\Message\ServerRequestInterface; use Tobscure\JsonApi\Document; diff --git a/framework/core/src/Api/Controller/ListPostsController.php b/framework/core/src/Api/Controller/ListPostsController.php index 071dbc41d..b506f814a 100644 --- a/framework/core/src/Api/Controller/ListPostsController.php +++ b/framework/core/src/Api/Controller/ListPostsController.php @@ -11,8 +11,8 @@ namespace Flarum\Api\Controller; -use Flarum\Post\PostRepository; use Flarum\Event\ConfigurePostsQuery; +use Flarum\Post\PostRepository; use Illuminate\Database\Eloquent\Builder; 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 f953e33b4..d27369655 100644 --- a/framework/core/src/Api/Controller/ListUsersController.php +++ b/framework/core/src/Api/Controller/ListUsersController.php @@ -12,8 +12,8 @@ namespace Flarum\Api\Controller; use Flarum\Api\UrlGenerator; -use Flarum\User\Exception\PermissionDeniedException; use Flarum\Search\SearchCriteria; +use Flarum\User\Exception\PermissionDeniedException; use Flarum\User\Search\UserSearcher; use Psr\Http\Message\ServerRequestInterface; use Tobscure\JsonApi\Document; diff --git a/framework/core/src/Api/Controller/SendConfirmationEmailController.php b/framework/core/src/Api/Controller/SendConfirmationEmailController.php index a6314ad97..2718501ea 100644 --- a/framework/core/src/Api/Controller/SendConfirmationEmailController.php +++ b/framework/core/src/Api/Controller/SendConfirmationEmailController.php @@ -11,12 +11,12 @@ namespace Flarum\Api\Controller; -use Flarum\User\AssertPermissionTrait; -use Flarum\User\EmailToken; -use Flarum\User\Exception\PermissionDeniedException; use Flarum\Forum\UrlGenerator; use Flarum\Http\Controller\ControllerInterface; use Flarum\Settings\SettingsRepositoryInterface; +use Flarum\User\AssertPermissionTrait; +use Flarum\User\EmailToken; +use Flarum\User\Exception\PermissionDeniedException; use Illuminate\Contracts\Mail\Mailer; use Illuminate\Mail\Message; use Psr\Http\Message\ServerRequestInterface; diff --git a/framework/core/src/Api/Controller/SetPermissionController.php b/framework/core/src/Api/Controller/SetPermissionController.php index a11dc056f..1171111b1 100644 --- a/framework/core/src/Api/Controller/SetPermissionController.php +++ b/framework/core/src/Api/Controller/SetPermissionController.php @@ -11,9 +11,9 @@ namespace Flarum\Api\Controller; -use Flarum\User\AssertPermissionTrait; use Flarum\Group\Permission; use Flarum\Http\Controller\ControllerInterface; +use Flarum\User\AssertPermissionTrait; use Psr\Http\Message\ServerRequestInterface; use Zend\Diactoros\Response\EmptyResponse; diff --git a/framework/core/src/Api/Controller/SetSettingsController.php b/framework/core/src/Api/Controller/SetSettingsController.php index b9cb59cdd..f98d4645f 100644 --- a/framework/core/src/Api/Controller/SetSettingsController.php +++ b/framework/core/src/Api/Controller/SetSettingsController.php @@ -11,11 +11,11 @@ namespace Flarum\Api\Controller; -use Flarum\User\AssertPermissionTrait; -use Flarum\Settings\Event\Serializing; -use Flarum\Settings\Event\Saved; use Flarum\Http\Controller\ControllerInterface; +use Flarum\Settings\Event\Saved; +use Flarum\Settings\Event\Serializing; use Flarum\Settings\SettingsRepositoryInterface; +use Flarum\User\AssertPermissionTrait; 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 376e48747..e0f6f6464 100644 --- a/framework/core/src/Api/Controller/TokenController.php +++ b/framework/core/src/Api/Controller/TokenController.php @@ -11,10 +11,10 @@ namespace Flarum\Api\Controller; -use Flarum\User\Exception\PermissionDeniedException; -use Flarum\User\UserRepository; use Flarum\Http\AccessToken; use Flarum\Http\Controller\ControllerInterface; +use Flarum\User\Exception\PermissionDeniedException; +use Flarum\User\UserRepository; 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/UninstallExtensionController.php b/framework/core/src/Api/Controller/UninstallExtensionController.php index 0e2f02a59..454ea6109 100644 --- a/framework/core/src/Api/Controller/UninstallExtensionController.php +++ b/framework/core/src/Api/Controller/UninstallExtensionController.php @@ -11,8 +11,8 @@ namespace Flarum\Api\Controller; -use Flarum\User\AssertPermissionTrait; use Flarum\Extension\ExtensionManager; +use Flarum\User\AssertPermissionTrait; use Psr\Http\Message\ServerRequestInterface; class UninstallExtensionController extends AbstractDeleteController diff --git a/framework/core/src/Api/Controller/UpdateExtensionController.php b/framework/core/src/Api/Controller/UpdateExtensionController.php index c701ae469..156d81b85 100644 --- a/framework/core/src/Api/Controller/UpdateExtensionController.php +++ b/framework/core/src/Api/Controller/UpdateExtensionController.php @@ -11,9 +11,9 @@ namespace Flarum\Api\Controller; -use Flarum\User\AssertPermissionTrait; use Flarum\Extension\ExtensionManager; use Flarum\Http\Controller\ControllerInterface; +use Flarum\User\AssertPermissionTrait; use Psr\Http\Message\ServerRequestInterface; class UpdateExtensionController implements ControllerInterface diff --git a/framework/core/src/Api/Controller/UploadFaviconController.php b/framework/core/src/Api/Controller/UploadFaviconController.php index 80b33abee..757d3f679 100644 --- a/framework/core/src/Api/Controller/UploadFaviconController.php +++ b/framework/core/src/Api/Controller/UploadFaviconController.php @@ -11,9 +11,9 @@ namespace Flarum\Api\Controller; -use Flarum\User\AssertPermissionTrait; use Flarum\Foundation\Application; use Flarum\Settings\SettingsRepositoryInterface; +use Flarum\User\AssertPermissionTrait; use Illuminate\Support\Str; use Intervention\Image\ImageManager; use League\Flysystem\Adapter\Local; diff --git a/framework/core/src/Api/Controller/UploadLogoController.php b/framework/core/src/Api/Controller/UploadLogoController.php index ed10a8b67..d6547d555 100644 --- a/framework/core/src/Api/Controller/UploadLogoController.php +++ b/framework/core/src/Api/Controller/UploadLogoController.php @@ -11,9 +11,9 @@ namespace Flarum\Api\Controller; -use Flarum\User\AssertPermissionTrait; use Flarum\Foundation\Application; use Flarum\Settings\SettingsRepositoryInterface; +use Flarum\User\AssertPermissionTrait; use Illuminate\Support\Str; use Intervention\Image\ImageManager; use League\Flysystem\Adapter\Local; diff --git a/framework/core/src/Api/Serializer/BasicPostSerializer.php b/framework/core/src/Api/Serializer/BasicPostSerializer.php index b63b6dec6..a2a10feeb 100644 --- a/framework/core/src/Api/Serializer/BasicPostSerializer.php +++ b/framework/core/src/Api/Serializer/BasicPostSerializer.php @@ -11,8 +11,8 @@ namespace Flarum\Api\Serializer; -use Flarum\Post\Post; use Flarum\Post\CommentPost; +use Flarum\Post\Post; use InvalidArgumentException; class BasicPostSerializer extends AbstractSerializer diff --git a/framework/core/src/Api/Serializer/DiscussionSerializer.php b/framework/core/src/Api/Serializer/DiscussionSerializer.php index 17c43e970..e31811127 100644 --- a/framework/core/src/Api/Serializer/DiscussionSerializer.php +++ b/framework/core/src/Api/Serializer/DiscussionSerializer.php @@ -11,8 +11,8 @@ namespace Flarum\Api\Serializer; -use Flarum\User\Gate; use Flarum\Discussion\Discussion; +use Flarum\User\Gate; class DiscussionSerializer extends BasicDiscussionSerializer { diff --git a/framework/core/src/Api/Serializer/PostSerializer.php b/framework/core/src/Api/Serializer/PostSerializer.php index 9f22c5704..613392427 100644 --- a/framework/core/src/Api/Serializer/PostSerializer.php +++ b/framework/core/src/Api/Serializer/PostSerializer.php @@ -11,8 +11,8 @@ namespace Flarum\Api\Serializer; -use Flarum\User\Gate; use Flarum\Post\CommentPost; +use Flarum\User\Gate; class PostSerializer extends BasicPostSerializer { diff --git a/framework/core/src/Api/routes.php b/framework/core/src/Api/routes.php index f394141a7..b83c57ea9 100644 --- a/framework/core/src/Api/routes.php +++ b/framework/core/src/Api/routes.php @@ -10,8 +10,8 @@ */ use Flarum\Api\Controller; -use Flarum\Http\RouteHandlerFactory; use Flarum\Http\RouteCollection; +use Flarum\Http\RouteHandlerFactory; return function (RouteCollection $map, RouteHandlerFactory $route) { // Get forum information diff --git a/framework/core/src/Console/Server.php b/framework/core/src/Console/Server.php index 45366ec83..f7ad12cbb 100644 --- a/framework/core/src/Console/Server.php +++ b/framework/core/src/Console/Server.php @@ -12,11 +12,11 @@ namespace Flarum\Console; use Flarum\Database\Console\GenerateMigrationCommand; +use Flarum\Database\Console\MigrateCommand; +use Flarum\Foundation\AbstractServer; use Flarum\Foundation\Console\CacheClearCommand; use Flarum\Foundation\Console\InfoCommand; -use Flarum\Foundation\AbstractServer; use Flarum\Install\Console\InstallCommand; -use Flarum\Database\Console\MigrateCommand; use Symfony\Component\Console\Application; class Server extends AbstractServer diff --git a/framework/core/src/Database/ScopeVisibilityTrait.php b/framework/core/src/Database/ScopeVisibilityTrait.php index 276f6a39d..03c18e341 100644 --- a/framework/core/src/Database/ScopeVisibilityTrait.php +++ b/framework/core/src/Database/ScopeVisibilityTrait.php @@ -11,8 +11,8 @@ namespace Flarum\Database; -use Flarum\User\User; use Flarum\Event\ScopeModelVisibility; +use Flarum\User\User; use Illuminate\Database\Eloquent\Builder; trait ScopeVisibilityTrait diff --git a/framework/core/src/Discussion/Discussion.php b/framework/core/src/Discussion/Discussion.php index 2c73a5aea..38e7bb048 100644 --- a/framework/core/src/Discussion/Discussion.php +++ b/framework/core/src/Discussion/Discussion.php @@ -11,18 +11,17 @@ namespace Flarum\Discussion; -use Flarum\Discussion\UserState; -use Flarum\Post\MergeableInterface; -use Flarum\Foundation\EventGeneratorTrait; -use Flarum\Database\ScopeVisibilityTrait; use Flarum\Database\AbstractModel; +use Flarum\Database\ScopeVisibilityTrait; use Flarum\Discussion\Event\Deleted; use Flarum\Discussion\Event\Hidden; use Flarum\Discussion\Event\Renamed; use Flarum\Discussion\Event\Restored; use Flarum\Discussion\Event\Started; -use Flarum\Post\Event\Deleted as PostDeleted; use Flarum\Event\ScopePostVisibility; +use Flarum\Foundation\EventGeneratorTrait; +use Flarum\Post\Event\Deleted as PostDeleted; +use Flarum\Post\MergeableInterface; use Flarum\Post\Post; use Flarum\User\Guest; use Flarum\User\User; diff --git a/framework/core/src/Discussion/DiscussionMetadataUpdater.php b/framework/core/src/Discussion/DiscussionMetadataUpdater.php index 123d8d8c0..b1f894f4c 100755 --- a/framework/core/src/Discussion/DiscussionMetadataUpdater.php +++ b/framework/core/src/Discussion/DiscussionMetadataUpdater.php @@ -11,11 +11,11 @@ namespace Flarum\Discussion; -use Flarum\Post\Post; use Flarum\Post\Event\Deleted; use Flarum\Post\Event\Hidden; use Flarum\Post\Event\Posted; use Flarum\Post\Event\Restored; +use Flarum\Post\Post; use Illuminate\Contracts\Events\Dispatcher; class DiscussionMetadataUpdater diff --git a/framework/core/src/Discussion/DiscussionPolicy.php b/framework/core/src/Discussion/DiscussionPolicy.php index b43345727..2839f239f 100644 --- a/framework/core/src/Discussion/DiscussionPolicy.php +++ b/framework/core/src/Discussion/DiscussionPolicy.php @@ -12,7 +12,6 @@ namespace Flarum\Discussion; use Carbon\Carbon; -use Flarum\Discussion\Discussion; use Flarum\Event\ScopeHiddenDiscussionVisibility; use Flarum\Event\ScopePrivateDiscussionVisibility; use Flarum\Settings\SettingsRepositoryInterface; diff --git a/framework/core/src/Discussion/DiscussionRenamedLogger.php b/framework/core/src/Discussion/DiscussionRenamedLogger.php index 8ccf74ff9..961bde5fb 100755 --- a/framework/core/src/Discussion/DiscussionRenamedLogger.php +++ b/framework/core/src/Discussion/DiscussionRenamedLogger.php @@ -11,10 +11,10 @@ namespace Flarum\Discussion; +use Flarum\Discussion\Event\Renamed; use Flarum\Notification\Blueprint\DiscussionRenamedBlueprint; use Flarum\Notification\NotificationSyncer; use Flarum\Post\DiscussionRenamedPost; -use Flarum\Discussion\Event\Renamed; use Illuminate\Contracts\Events\Dispatcher; class DiscussionRenamedLogger diff --git a/framework/core/src/Discussion/Search/DiscussionSearcher.php b/framework/core/src/Discussion/Search/DiscussionSearcher.php index 81ac2803a..9a6e215ae 100644 --- a/framework/core/src/Discussion/Search/DiscussionSearcher.php +++ b/framework/core/src/Discussion/Search/DiscussionSearcher.php @@ -13,13 +13,10 @@ namespace Flarum\Discussion\Search; use Flarum\Discussion\Discussion; use Flarum\Discussion\DiscussionRepository; -use Flarum\Discussion\Search\DiscussionSearch; +use Flarum\Event\ConfigureDiscussionSearch; use Flarum\Post\PostRepository; use Flarum\Search\ApplySearchParametersTrait; use Flarum\Search\GambitManager; -use Flarum\Search\SearchCriteria; -use Flarum\Search\SearchResults; -use Flarum\Event\ConfigureDiscussionSearch; use Illuminate\Database\Eloquent\Collection; /** diff --git a/framework/core/src/Discussion/Search/Gambit/AuthorGambit.php b/framework/core/src/Discussion/Search/Gambit/AuthorGambit.php index 15e425512..d3f4544ab 100644 --- a/framework/core/src/Discussion/Search/Gambit/AuthorGambit.php +++ b/framework/core/src/Discussion/Search/Gambit/AuthorGambit.php @@ -11,10 +11,10 @@ namespace Flarum\Discussion\Search\Gambit; -use Flarum\User\UserRepository; +use Flarum\Discussion\Search\DiscussionSearch; use Flarum\Search\AbstractRegexGambit; use Flarum\Search\AbstractSearch; -use Flarum\Discussion\Search\DiscussionSearch; +use Flarum\User\UserRepository; use LogicException; class AuthorGambit extends AbstractRegexGambit diff --git a/framework/core/src/Discussion/Search/Gambit/CreatedGambit.php b/framework/core/src/Discussion/Search/Gambit/CreatedGambit.php index 0b38fec35..6241c0e16 100644 --- a/framework/core/src/Discussion/Search/Gambit/CreatedGambit.php +++ b/framework/core/src/Discussion/Search/Gambit/CreatedGambit.php @@ -11,9 +11,9 @@ namespace Flarum\Discussion\Search\Gambit; +use Flarum\Discussion\Search\DiscussionSearch; use Flarum\Search\AbstractRegexGambit; use Flarum\Search\AbstractSearch; -use Flarum\Discussion\Search\DiscussionSearch; use LogicException; class CreatedGambit extends AbstractRegexGambit diff --git a/framework/core/src/Discussion/Search/Gambit/FulltextGambit.php b/framework/core/src/Discussion/Search/Gambit/FulltextGambit.php index da54f358f..3019f9f0f 100644 --- a/framework/core/src/Discussion/Search/Gambit/FulltextGambit.php +++ b/framework/core/src/Discussion/Search/Gambit/FulltextGambit.php @@ -11,9 +11,9 @@ namespace Flarum\Discussion\Search\Gambit; -use Flarum\Search\AbstractSearch; use Flarum\Discussion\Search\DiscussionSearch; use Flarum\Discussion\Search\Fulltext\DriverInterface; +use Flarum\Search\AbstractSearch; use Flarum\Search\GambitInterface; use LogicException; diff --git a/framework/core/src/Discussion/Search/Gambit/HiddenGambit.php b/framework/core/src/Discussion/Search/Gambit/HiddenGambit.php index 9bd1c7b24..907991546 100644 --- a/framework/core/src/Discussion/Search/Gambit/HiddenGambit.php +++ b/framework/core/src/Discussion/Search/Gambit/HiddenGambit.php @@ -11,9 +11,9 @@ namespace Flarum\Discussion\Search\Gambit; +use Flarum\Discussion\Search\DiscussionSearch; use Flarum\Search\AbstractRegexGambit; use Flarum\Search\AbstractSearch; -use Flarum\Discussion\Search\DiscussionSearch; use LogicException; class HiddenGambit extends AbstractRegexGambit diff --git a/framework/core/src/Discussion/Search/Gambit/UnreadGambit.php b/framework/core/src/Discussion/Search/Gambit/UnreadGambit.php index 87eb7cfe2..bd9a60629 100644 --- a/framework/core/src/Discussion/Search/Gambit/UnreadGambit.php +++ b/framework/core/src/Discussion/Search/Gambit/UnreadGambit.php @@ -12,9 +12,9 @@ namespace Flarum\Discussion\Search\Gambit; use Flarum\Discussion\DiscussionRepository; +use Flarum\Discussion\Search\DiscussionSearch; use Flarum\Search\AbstractRegexGambit; use Flarum\Search\AbstractSearch; -use Flarum\Discussion\Search\DiscussionSearch; use LogicException; class UnreadGambit extends AbstractRegexGambit diff --git a/framework/core/src/Discussion/UserState.php b/framework/core/src/Discussion/UserState.php index 68a9ad714..481893f91 100644 --- a/framework/core/src/Discussion/UserState.php +++ b/framework/core/src/Discussion/UserState.php @@ -11,10 +11,9 @@ namespace Flarum\Discussion; -use Flarum\Discussion\Discussion; -use Flarum\Foundation\EventGeneratorTrait; use Flarum\Database\AbstractModel; use Flarum\Discussion\Event\UserRead; +use Flarum\Foundation\EventGeneratorTrait; use Illuminate\Database\Eloquent\Builder; /** diff --git a/framework/core/src/Event/AbstractConfigureRoutes.php b/framework/core/src/Event/AbstractConfigureRoutes.php index fec628648..c09ab958c 100644 --- a/framework/core/src/Event/AbstractConfigureRoutes.php +++ b/framework/core/src/Event/AbstractConfigureRoutes.php @@ -11,8 +11,8 @@ namespace Flarum\Event; -use Flarum\Http\RouteHandlerFactory; use Flarum\Http\RouteCollection; +use Flarum\Http\RouteHandlerFactory; abstract class AbstractConfigureRoutes { diff --git a/framework/core/src/Extension/ExtensionManager.php b/framework/core/src/Extension/ExtensionManager.php index 724250aec..404638fd5 100644 --- a/framework/core/src/Extension/ExtensionManager.php +++ b/framework/core/src/Extension/ExtensionManager.php @@ -13,10 +13,10 @@ namespace Flarum\Extension; use Flarum\Database\Migrator; use Flarum\Extension\Event\Disabled; -use Flarum\Extension\Event\Enabled; -use Flarum\Extension\Event\Uninstalled; use Flarum\Extension\Event\Disabling; +use Flarum\Extension\Event\Enabled; use Flarum\Extension\Event\Enabling; +use Flarum\Extension\Event\Uninstalled; use Flarum\Foundation\Application; use Flarum\Settings\SettingsRepositoryInterface; use Illuminate\Contracts\Events\Dispatcher; diff --git a/framework/core/src/Forum/Controller/DiscussionController.php b/framework/core/src/Forum/Controller/DiscussionController.php index 4b60ecc84..f952ba799 100644 --- a/framework/core/src/Forum/Controller/DiscussionController.php +++ b/framework/core/src/Forum/Controller/DiscussionController.php @@ -12,8 +12,8 @@ namespace Flarum\Forum\Controller; use Flarum\Api\Client; -use Flarum\Forum\UrlGenerator; use Flarum\Forum\Frontend; +use Flarum\Forum\UrlGenerator; use Flarum\Http\Exception\RouteNotFoundException; use Flarum\User\User; use Illuminate\Contracts\Events\Dispatcher; diff --git a/framework/core/src/Forum/Controller/IndexController.php b/framework/core/src/Forum/Controller/IndexController.php index 278710aab..2df0c2158 100644 --- a/framework/core/src/Forum/Controller/IndexController.php +++ b/framework/core/src/Forum/Controller/IndexController.php @@ -12,8 +12,8 @@ namespace Flarum\Forum\Controller; use Flarum\Api\Client as ApiClient; -use Flarum\User\User; use Flarum\Forum\Frontend; +use Flarum\User\User; use Illuminate\Contracts\Events\Dispatcher; use Psr\Http\Message\ServerRequestInterface as Request; diff --git a/framework/core/src/Forum/Controller/LogInController.php b/framework/core/src/Forum/Controller/LogInController.php index 5cabd47dd..493f301df 100644 --- a/framework/core/src/Forum/Controller/LogInController.php +++ b/framework/core/src/Forum/Controller/LogInController.php @@ -13,12 +13,12 @@ namespace Flarum\Forum\Controller; use Flarum\Api\Client; use Flarum\Api\Controller\TokenController; -use Flarum\User\UserRepository; -use Flarum\User\Event\LoggedIn; use Flarum\Http\AccessToken; use Flarum\Http\Controller\ControllerInterface; use Flarum\Http\Rememberer; use Flarum\Http\SessionAuthenticator; +use Flarum\User\Event\LoggedIn; +use Flarum\User\UserRepository; use Psr\Http\Message\ServerRequestInterface as Request; use Zend\Diactoros\Response\EmptyResponse; use Zend\Diactoros\Response\JsonResponse; diff --git a/framework/core/src/Forum/Controller/LogOutController.php b/framework/core/src/Forum/Controller/LogOutController.php index af220a6b6..d5d191f7e 100644 --- a/framework/core/src/Forum/Controller/LogOutController.php +++ b/framework/core/src/Forum/Controller/LogOutController.php @@ -11,13 +11,13 @@ namespace Flarum\Forum\Controller; -use Flarum\User\AssertPermissionTrait; -use Flarum\User\Event\LoggedOut; use Flarum\Foundation\Application; use Flarum\Http\Controller\ControllerInterface; use Flarum\Http\Exception\TokenMismatchException; use Flarum\Http\Rememberer; use Flarum\Http\SessionAuthenticator; +use Flarum\User\AssertPermissionTrait; +use Flarum\User\Event\LoggedOut; use Illuminate\Contracts\Events\Dispatcher; use Psr\Http\Message\ServerRequestInterface as Request; use Zend\Diactoros\Response\RedirectResponse; diff --git a/framework/core/src/Forum/Controller/ResetPasswordController.php b/framework/core/src/Forum/Controller/ResetPasswordController.php index 36e313a2e..641da9b42 100644 --- a/framework/core/src/Forum/Controller/ResetPasswordController.php +++ b/framework/core/src/Forum/Controller/ResetPasswordController.php @@ -12,9 +12,9 @@ namespace Flarum\Forum\Controller; use DateTime; +use Flarum\Http\Controller\AbstractHtmlController; use Flarum\User\Exception\InvalidConfirmationTokenException; use Flarum\User\PasswordToken; -use Flarum\Http\Controller\AbstractHtmlController; use Illuminate\Contracts\View\Factory; use Psr\Http\Message\ServerRequestInterface as Request; use Symfony\Component\Translation\TranslatorInterface; diff --git a/framework/core/src/Forum/Controller/SavePasswordController.php b/framework/core/src/Forum/Controller/SavePasswordController.php index 20623cf8f..541113ebd 100644 --- a/framework/core/src/Forum/Controller/SavePasswordController.php +++ b/framework/core/src/Forum/Controller/SavePasswordController.php @@ -11,11 +11,11 @@ namespace Flarum\Forum\Controller; -use Flarum\User\PasswordToken; -use Flarum\User\UserValidator; use Flarum\Forum\UrlGenerator; use Flarum\Http\Controller\ControllerInterface; use Flarum\Http\SessionAuthenticator; +use Flarum\User\PasswordToken; +use Flarum\User\UserValidator; use Illuminate\Contracts\Validation\Factory; use Illuminate\Contracts\Validation\ValidationException; use Psr\Http\Message\ServerRequestInterface as Request; diff --git a/framework/core/src/Forum/ForumServiceProvider.php b/framework/core/src/Forum/ForumServiceProvider.php index 8b96164a6..7526ad4b7 100644 --- a/framework/core/src/Forum/ForumServiceProvider.php +++ b/framework/core/src/Forum/ForumServiceProvider.php @@ -14,10 +14,10 @@ namespace Flarum\Forum; use Flarum\Event\ConfigureForumRoutes; use Flarum\Extension\Event\Disabled; use Flarum\Extension\Event\Enabled; -use Flarum\Settings\Event\Saved; use Flarum\Foundation\AbstractServiceProvider; -use Flarum\Http\RouteHandlerFactory; use Flarum\Http\RouteCollection; +use Flarum\Http\RouteHandlerFactory; +use Flarum\Settings\Event\Saved; class ForumServiceProvider extends AbstractServiceProvider { diff --git a/framework/core/src/Forum/routes.php b/framework/core/src/Forum/routes.php index 028fe37dd..00f7bf303 100644 --- a/framework/core/src/Forum/routes.php +++ b/framework/core/src/Forum/routes.php @@ -10,8 +10,8 @@ */ use Flarum\Forum\Controller; -use Flarum\Http\RouteHandlerFactory; use Flarum\Http\RouteCollection; +use Flarum\Http\RouteHandlerFactory; return function (RouteCollection $map, RouteHandlerFactory $route) { $map->get( diff --git a/framework/core/src/Frontend/FrontendAssets.php b/framework/core/src/Frontend/FrontendAssets.php index e3bce2f16..277b39547 100644 --- a/framework/core/src/Frontend/FrontendAssets.php +++ b/framework/core/src/Frontend/FrontendAssets.php @@ -11,9 +11,9 @@ namespace Flarum\Frontend; +use Flarum\Foundation\Application; use Flarum\Frontend\Asset\JsCompiler; use Flarum\Frontend\Asset\LessCompiler; -use Flarum\Foundation\Application; use Flarum\Frontend\Asset\LocaleJsCompiler as LocaleJsCompiler; use Flarum\Locale\LocaleManager; use Illuminate\Contracts\Cache\Repository; diff --git a/framework/core/src/Frontend/FrontendView.php b/framework/core/src/Frontend/FrontendView.php index 0593e070a..7a40c7169 100644 --- a/framework/core/src/Frontend/FrontendView.php +++ b/framework/core/src/Frontend/FrontendView.php @@ -13,8 +13,8 @@ namespace Flarum\Frontend; use Flarum\Api\Client; use Flarum\Api\Serializer\AbstractSerializer; -use Flarum\Frontend\Asset\CompilerInterface; use Flarum\Foundation\Application; +use Flarum\Frontend\Asset\CompilerInterface; use Flarum\Frontend\Asset\LocaleJsCompiler; use Flarum\Locale\LocaleManager; use Illuminate\View\Factory; diff --git a/framework/core/src/Group/Group.php b/framework/core/src/Group/Group.php index dd30cbb53..4af4a4d61 100755 --- a/framework/core/src/Group/Group.php +++ b/framework/core/src/Group/Group.php @@ -11,9 +11,9 @@ namespace Flarum\Group; -use Flarum\Foundation\EventGeneratorTrait; -use Flarum\Database\ScopeVisibilityTrait; use Flarum\Database\AbstractModel; +use Flarum\Database\ScopeVisibilityTrait; +use Flarum\Foundation\EventGeneratorTrait; use Flarum\Group\Event\Created; use Flarum\Group\Event\Deleting; use Flarum\Group\Event\Renamed; diff --git a/framework/core/src/Http/AbstractServer.php b/framework/core/src/Http/AbstractServer.php index de6f923c2..0cf7bd39d 100644 --- a/framework/core/src/Http/AbstractServer.php +++ b/framework/core/src/Http/AbstractServer.php @@ -11,11 +11,11 @@ namespace Flarum\Http; +use Flarum\Foundation\AbstractServer as BaseAbstractServer; +use Flarum\Foundation\Application; use Flarum\User\AuthToken; use Flarum\User\EmailToken; use Flarum\User\PasswordToken; -use Flarum\Foundation\AbstractServer as BaseAbstractServer; -use Flarum\Foundation\Application; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Zend\Diactoros\Server; diff --git a/framework/core/src/Http/Middleware/AuthenticateWithHeader.php b/framework/core/src/Http/Middleware/AuthenticateWithHeader.php index c13313754..85ad9bf1f 100644 --- a/framework/core/src/Http/Middleware/AuthenticateWithHeader.php +++ b/framework/core/src/Http/Middleware/AuthenticateWithHeader.php @@ -12,8 +12,8 @@ namespace Flarum\Http\Middleware; use Flarum\Api\ApiKey; -use Flarum\User\User; use Flarum\Http\AccessToken; +use Flarum\User\User; use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use Zend\Stratigility\MiddlewareInterface; diff --git a/framework/core/src/Install/Console/InstallCommand.php b/framework/core/src/Install/Console/InstallCommand.php index c75928601..f7f9d3a98 100644 --- a/framework/core/src/Install/Console/InstallCommand.php +++ b/framework/core/src/Install/Console/InstallCommand.php @@ -13,10 +13,10 @@ namespace Flarum\Install\Console; use Exception; use Flarum\Console\AbstractCommand; +use Flarum\Database\AbstractModel; use Flarum\Group\Group; use Flarum\Group\Permission; use Flarum\User\User; -use Flarum\Database\AbstractModel; use Illuminate\Contracts\Foundation\Application; use Illuminate\Filesystem\Filesystem; use Illuminate\Validation\Factory; diff --git a/framework/core/src/Install/InstallServiceProvider.php b/framework/core/src/Install/InstallServiceProvider.php index 26c089c06..733a1ce9e 100644 --- a/framework/core/src/Install/InstallServiceProvider.php +++ b/framework/core/src/Install/InstallServiceProvider.php @@ -12,8 +12,8 @@ namespace Flarum\Install; use Flarum\Foundation\AbstractServiceProvider; -use Flarum\Http\RouteHandlerFactory; use Flarum\Http\RouteCollection; +use Flarum\Http\RouteHandlerFactory; use Flarum\Install\Prerequisite\Composite; use Flarum\Install\Prerequisite\PhpExtensions; use Flarum\Install\Prerequisite\PhpVersion; diff --git a/framework/core/src/Notification/NotificationSyncer.php b/framework/core/src/Notification/NotificationSyncer.php index 5abef59e2..7065c461d 100644 --- a/framework/core/src/Notification/NotificationSyncer.php +++ b/framework/core/src/Notification/NotificationSyncer.php @@ -12,8 +12,8 @@ namespace Flarum\Notification; use Carbon\Carbon; -use Flarum\Notification\Event\Sending; use Flarum\Notification\Blueprint\BlueprintInterface; +use Flarum\Notification\Event\Sending; use Flarum\User\User; /** diff --git a/framework/core/src/Post/CommentPost.php b/framework/core/src/Post/CommentPost.php index e42403b7e..f8edc6834 100755 --- a/framework/core/src/Post/CommentPost.php +++ b/framework/core/src/Post/CommentPost.php @@ -11,11 +11,11 @@ namespace Flarum\Post; +use Flarum\Formatter\Formatter; use Flarum\Post\Event\Hidden; use Flarum\Post\Event\Posted; use Flarum\Post\Event\Restored; use Flarum\Post\Event\Revised; -use Flarum\Formatter\Formatter; use Flarum\User\User; /** diff --git a/framework/core/src/Post/Post.php b/framework/core/src/Post/Post.php index c85538582..d603c0e03 100755 --- a/framework/core/src/Post/Post.php +++ b/framework/core/src/Post/Post.php @@ -11,9 +11,9 @@ namespace Flarum\Post; -use Flarum\Foundation\EventGeneratorTrait; -use Flarum\Database\ScopeVisibilityTrait; use Flarum\Database\AbstractModel; +use Flarum\Database\ScopeVisibilityTrait; +use Flarum\Foundation\EventGeneratorTrait; use Flarum\Post\Event\Deleted; use Flarum\User\User; use Illuminate\Database\Eloquent\Builder; diff --git a/framework/core/src/Update/Controller/UpdateController.php b/framework/core/src/Update/Controller/UpdateController.php index 2a0335030..390aff798 100644 --- a/framework/core/src/Update/Controller/UpdateController.php +++ b/framework/core/src/Update/Controller/UpdateController.php @@ -12,9 +12,9 @@ namespace Flarum\Update\Controller; use Exception; +use Flarum\Database\Console\MigrateCommand; use Flarum\Foundation\Application; use Flarum\Http\Controller\ControllerInterface; -use Flarum\Database\Console\MigrateCommand; use Psr\Http\Message\ServerRequestInterface as Request; use Symfony\Component\Console\Input\StringInput; use Symfony\Component\Console\Output\StreamOutput; diff --git a/framework/core/src/Update/UpdateServiceProvider.php b/framework/core/src/Update/UpdateServiceProvider.php index f45364230..7fc93cdc0 100644 --- a/framework/core/src/Update/UpdateServiceProvider.php +++ b/framework/core/src/Update/UpdateServiceProvider.php @@ -12,8 +12,8 @@ namespace Flarum\Update; use Flarum\Foundation\AbstractServiceProvider; -use Flarum\Http\RouteHandlerFactory; use Flarum\Http\RouteCollection; +use Flarum\Http\RouteHandlerFactory; class UpdateServiceProvider extends AbstractServiceProvider { diff --git a/framework/core/src/User/AuthToken.php b/framework/core/src/User/AuthToken.php index dd785b72a..2458baca5 100644 --- a/framework/core/src/User/AuthToken.php +++ b/framework/core/src/User/AuthToken.php @@ -12,8 +12,8 @@ namespace Flarum\User; use DateTime; -use Flarum\User\Exception\InvalidConfirmationTokenException; use Flarum\Database\AbstractModel; +use Flarum\User\Exception\InvalidConfirmationTokenException; /** * @todo document database columns with @property diff --git a/framework/core/src/User/Command/UploadAvatarHandler.php b/framework/core/src/User/Command/UploadAvatarHandler.php index 454373099..c674d44b8 100644 --- a/framework/core/src/User/Command/UploadAvatarHandler.php +++ b/framework/core/src/User/Command/UploadAvatarHandler.php @@ -16,8 +16,8 @@ use Flarum\Event\AvatarWillBeSaved; use Flarum\Foundation\Application; use Flarum\Foundation\DispatchEventsTrait; use Flarum\User\AssertPermissionTrait; -use Flarum\User\UserRepository; use Flarum\User\AvatarValidator; +use Flarum\User\UserRepository; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Support\Str; use Intervention\Image\ImageManager; diff --git a/framework/core/src/User/EmailConfirmationMailer.php b/framework/core/src/User/EmailConfirmationMailer.php index b02c3f037..9ff225dc9 100755 --- a/framework/core/src/User/EmailConfirmationMailer.php +++ b/framework/core/src/User/EmailConfirmationMailer.php @@ -11,10 +11,10 @@ namespace Flarum\User; -use Flarum\User\Event\EmailChangeRequested; -use Flarum\User\Event\Registered; use Flarum\Forum\UrlGenerator; use Flarum\Settings\SettingsRepositoryInterface; +use Flarum\User\Event\EmailChangeRequested; +use Flarum\User\Event\Registered; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Mail\Mailer; use Illuminate\Mail\Message; diff --git a/framework/core/src/User/EmailToken.php b/framework/core/src/User/EmailToken.php index f60d35c89..ac143ea12 100644 --- a/framework/core/src/User/EmailToken.php +++ b/framework/core/src/User/EmailToken.php @@ -12,8 +12,8 @@ namespace Flarum\User; use DateTime; -use Flarum\User\Exception\InvalidConfirmationTokenException; use Flarum\Database\AbstractModel; +use Flarum\User\Exception\InvalidConfirmationTokenException; /** * @todo document database columns with @property diff --git a/framework/core/src/User/Event/LoggedIn.php b/framework/core/src/User/Event/LoggedIn.php index 32d17b695..3659a0e40 100644 --- a/framework/core/src/User/Event/LoggedIn.php +++ b/framework/core/src/User/Event/LoggedIn.php @@ -11,8 +11,8 @@ namespace Flarum\User\Event; -use Flarum\User\User; use Flarum\Http\AccessToken; +use Flarum\User\User; class LoggedIn { diff --git a/framework/core/src/User/Search/UserSearcher.php b/framework/core/src/User/Search/UserSearcher.php index 2cb5cab2b..518b4c85e 100644 --- a/framework/core/src/User/Search/UserSearcher.php +++ b/framework/core/src/User/Search/UserSearcher.php @@ -11,12 +11,12 @@ namespace Flarum\User\Search; -use Flarum\User\UserRepository; +use Flarum\Event\ConfigureUserSearch; use Flarum\Search\ApplySearchParametersTrait; use Flarum\Search\GambitManager; use Flarum\Search\SearchCriteria; use Flarum\Search\SearchResults; -use Flarum\Event\ConfigureUserSearch; +use Flarum\User\UserRepository; /** * Takes a UserSearchCriteria object, performs a search using gambits, diff --git a/framework/core/src/User/User.php b/framework/core/src/User/User.php index ea222484f..b035a58f4 100755 --- a/framework/core/src/User/User.php +++ b/framework/core/src/User/User.php @@ -12,26 +12,26 @@ namespace Flarum\User; use DomainException; -use Flarum\Group\Group; -use Flarum\Notification\Notification; -use Flarum\Group\Permission; -use Flarum\Foundation\EventGeneratorTrait; -use Flarum\Database\ScopeVisibilityTrait; use Flarum\Database\AbstractModel; +use Flarum\Database\ScopeVisibilityTrait; use Flarum\Event\CheckUserPassword; use Flarum\Event\ConfigureUserPreferences; -use Flarum\Post\Event\Deleted as PostDeleted; use Flarum\Event\PrepareUserGroups; +use Flarum\Foundation\Application; +use Flarum\Foundation\EventGeneratorTrait; +use Flarum\Group\Group; +use Flarum\Group\Permission; +use Flarum\Notification\Notification; +use Flarum\Post\Event\Deleted as PostDeleted; +use Flarum\User\Event\Activated; use Flarum\User\Event\AvatarChanged; use Flarum\User\Event\BioChanged; -use Flarum\User\Event\EmailChangeRequested; -use Flarum\User\Event\EmailChanged; -use Flarum\User\Event\PasswordChanged; -use Flarum\User\Event\Activated; use Flarum\User\Event\Deleted; +use Flarum\User\Event\EmailChanged; +use Flarum\User\Event\EmailChangeRequested; +use Flarum\User\Event\PasswordChanged; use Flarum\User\Event\Registered; use Flarum\User\Event\Renamed; -use Flarum\Foundation\Application; use Illuminate\Contracts\Hashing\Hasher; use Symfony\Component\HttpFoundation\Session\SessionInterface; diff --git a/framework/core/src/User/UserPolicy.php b/framework/core/src/User/UserPolicy.php index 3a52fcaf0..73754f0b8 100644 --- a/framework/core/src/User/UserPolicy.php +++ b/framework/core/src/User/UserPolicy.php @@ -11,7 +11,6 @@ namespace Flarum\User; -use Flarum\User\AbstractPolicy; use Illuminate\Database\Eloquent\Builder; class UserPolicy extends AbstractPolicy