0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-04-30 22:50:05 +00:00

Fleshed out entity provided and optimized imports

This commit is contained in:
Dan Brown 2018-09-25 16:58:03 +01:00
parent 919660678b
commit 257a5a23ec
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
49 changed files with 144 additions and 133 deletions

View file

@ -1,6 +1,5 @@
<?php namespace BookStack\Actions; <?php namespace BookStack\Actions;
use BookStack\Actions\Activity;
use BookStack\Auth\Permissions\PermissionService; use BookStack\Auth\Permissions\PermissionService;
use BookStack\Entities\Entity; use BookStack\Entities\Entity;
use Session; use Session;

View file

@ -1,6 +1,5 @@
<?php namespace BookStack\Actions; <?php namespace BookStack\Actions;
use BookStack\Actions\Comment;
use BookStack\Entities\Entity; use BookStack\Entities\Entity;
/** /**

View file

@ -1,7 +1,7 @@
<?php namespace BookStack\Actions; <?php namespace BookStack\Actions;
use BookStack\Entities\Entity;
use BookStack\Auth\Permissions\PermissionService; use BookStack\Auth\Permissions\PermissionService;
use BookStack\Entities\Entity;
/** /**
* Class TagRepo * Class TagRepo

View file

@ -1,11 +1,11 @@
<?php namespace BookStack\Auth\Access; <?php namespace BookStack\Auth\Access;
use BookStack\Notifications\ConfirmEmail; use BookStack\Auth\User;
use BookStack\Auth\UserRepo; use BookStack\Auth\UserRepo;
use Carbon\Carbon;
use BookStack\Exceptions\ConfirmationEmailException; use BookStack\Exceptions\ConfirmationEmailException;
use BookStack\Exceptions\UserRegistrationException; use BookStack\Exceptions\UserRegistrationException;
use BookStack\Auth\User; use BookStack\Notifications\ConfirmEmail;
use Carbon\Carbon;
use Illuminate\Database\Connection as Database; use Illuminate\Database\Connection as Database;
class EmailConfirmationService class EmailConfirmationService

View file

@ -1,11 +1,10 @@
<?php namespace BookStack\Auth\Access; <?php namespace BookStack\Auth\Access;
use BookStack\Auth\Access; use BookStack\Auth\Access;
use BookStack\Exceptions\LdapException;
use BookStack\Auth\UserRepo;
use BookStack\Auth\Role; use BookStack\Auth\Role;
use BookStack\Auth\User; use BookStack\Auth\User;
use BookStack\Auth\Access\Ldap; use BookStack\Auth\UserRepo;
use BookStack\Exceptions\LdapException;
use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;

View file

@ -1,11 +1,11 @@
<?php namespace BookStack\Auth\Access; <?php namespace BookStack\Auth\Access;
use BookStack\Exceptions\SocialSignInAccountNotUsed;
use Laravel\Socialite\Contracts\Factory as Socialite;
use BookStack\Exceptions\SocialDriverNotConfigured;
use BookStack\Exceptions\UserRegistrationException;
use BookStack\Auth\UserRepo;
use BookStack\Auth\SocialAccount; use BookStack\Auth\SocialAccount;
use BookStack\Auth\UserRepo;
use BookStack\Exceptions\SocialDriverNotConfigured;
use BookStack\Exceptions\SocialSignInAccountNotUsed;
use BookStack\Exceptions\UserRegistrationException;
use Laravel\Socialite\Contracts\Factory as Socialite;
use Laravel\Socialite\Contracts\User as SocialUser; use Laravel\Socialite\Contracts\User as SocialUser;
class SocialAuthService class SocialAuthService

View file

@ -1,8 +1,8 @@
<?php namespace BookStack\Auth\Permissions; <?php namespace BookStack\Auth\Permissions;
use BookStack\Auth\Role;
use BookStack\Entities\Entity; use BookStack\Entities\Entity;
use BookStack\Model; use BookStack\Model;
use BookStack\Auth\Role;
class JointPermission extends Model class JointPermission extends Model
{ {

View file

@ -1,16 +1,13 @@
<?php namespace BookStack\Auth\Permissions; <?php namespace BookStack\Auth\Permissions;
use BookStack\Auth\Permissions; use BookStack\Auth\Permissions;
use BookStack\Auth\Role;
use BookStack\Entities\Book; use BookStack\Entities\Book;
use BookStack\Entities\Bookshelf; use BookStack\Entities\Bookshelf;
use BookStack\Entities\Chapter; use BookStack\Entities\Chapter;
use BookStack\Entities\Entity; use BookStack\Entities\Entity;
use BookStack\Auth\Permissions\EntityPermission;
use BookStack\Auth\Permissions\JointPermission;
use BookStack\Ownable;
use BookStack\Entities\Page; use BookStack\Entities\Page;
use BookStack\Auth\Role; use BookStack\Ownable;
use BookStack\Auth\User;
use Illuminate\Database\Connection; use Illuminate\Database\Connection;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Query\Builder as QueryBuilder; use Illuminate\Database\Query\Builder as QueryBuilder;

View file

@ -1,11 +1,8 @@
<?php namespace BookStack\Auth\Permissions; <?php namespace BookStack\Auth\Permissions;
use BookStack\Auth\Permissions; use BookStack\Auth\Permissions;
use BookStack\Exceptions\PermissionsException;
use BookStack\Auth\Permissions\RolePermission;
use BookStack\Auth\Role; use BookStack\Auth\Role;
use BookStack\Auth\Permissions\PermissionService; use BookStack\Exceptions\PermissionsException;
use Setting;
class PermissionsRepo class PermissionsRepo
{ {

View file

@ -2,7 +2,6 @@
use BookStack\Auth\Permissions\JointPermission; use BookStack\Auth\Permissions\JointPermission;
use BookStack\Model; use BookStack\Model;
use BookStack\Auth\Permissions\RolePermission;
class Role extends Model class Role extends Model
{ {

View file

@ -1,6 +1,5 @@
<?php namespace BookStack\Auth; <?php namespace BookStack\Auth;
use BookStack\Auth\User;
use BookStack\Model; use BookStack\Model;
class SocialAccount extends Model class SocialAccount extends Model

View file

@ -1,10 +1,8 @@
<?php namespace BookStack\Auth; <?php namespace BookStack\Auth;
use BookStack\Uploads\Image;
use BookStack\Model; use BookStack\Model;
use BookStack\Notifications\ResetPassword; use BookStack\Notifications\ResetPassword;
use BookStack\Auth\Role; use BookStack\Uploads\Image;
use BookStack\Auth\SocialAccount;
use Illuminate\Auth\Authenticatable; use Illuminate\Auth\Authenticatable;
use Illuminate\Auth\Passwords\CanResetPassword; use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;

View file

@ -4,8 +4,6 @@ use Activity;
use BookStack\Entities\EntityRepo; use BookStack\Entities\EntityRepo;
use BookStack\Exceptions\NotFoundException; use BookStack\Exceptions\NotFoundException;
use BookStack\Uploads\Image; use BookStack\Uploads\Image;
use BookStack\Auth\Role;
use BookStack\Auth\User;
use Exception; use Exception;
use Images; use Images;

View file

@ -1,7 +1,6 @@
<?php namespace BookStack\Entities; <?php namespace BookStack\Entities;
use BookStack\Uploads\Image; use BookStack\Uploads\Image;
use BookStack\Entities\Page;
class Book extends Entity class Book extends Entity
{ {

View file

@ -1,9 +1,5 @@
<?php namespace BookStack\Entities; <?php namespace BookStack\Entities;
use BookStack\Entities\Book;
use BookStack\Entities\Entity;
use BookStack\Entities\Page;
class Chapter extends Entity class Chapter extends Entity
{ {
public $searchFactor = 1.3; public $searchFactor = 1.3;

View file

@ -2,11 +2,11 @@
use BookStack\Actions\Activity; use BookStack\Actions\Activity;
use BookStack\Actions\Comment; use BookStack\Actions\Comment;
use BookStack\Actions\Tag;
use BookStack\Actions\View;
use BookStack\Auth\Permissions\EntityPermission; use BookStack\Auth\Permissions\EntityPermission;
use BookStack\Auth\Permissions\JointPermission; use BookStack\Auth\Permissions\JointPermission;
use BookStack\Ownable; use BookStack\Ownable;
use BookStack\Actions\Tag;
use BookStack\Actions\View;
use Illuminate\Database\Eloquent\Relations\MorphMany; use Illuminate\Database\Eloquent\Relations\MorphMany;
class Entity extends Ownable class Entity extends Ownable

View file

@ -1,7 +1,78 @@
<?php namespace BookStack\Entities; <?php namespace BookStack\Entities;
/**
* Class EntityProvider
*
* Provides access to the core entity models.
* Wrapped up in this provider since they are often used together
* so this is a neater alternative to injecting all in individually.
*
* @package BookStack\Entities
*/
class EntityProvider class EntityProvider
{ {
// TODO -
/**
* @var Bookshelf
*/
protected $bookshelf;
/**
* @var Book
*/
protected $book;
/**
* @var Chapter
*/
protected $chapter;
/**
* @var Page
*/
protected $page;
/**
* @var PageRevision
*/
protected $pageRevision;
/**
* EntityProvider constructor.
* @param Bookshelf $bookshelf
* @param Book $book
* @param Chapter $chapter
* @param Page $page
* @param PageRevision $pageRevision
*/
public function __construct(
Bookshelf $bookshelf,
Book $book,
Chapter $chapter,
Page $page,
PageRevision $pageRevision
) {
$this->bookshelf = $bookshelf;
$this->book = $book;
$this->chapter = $chapter;
$this->page = $page;
$this->pageRevision = $pageRevision;
}
/**
* Fetch all core entity types as an associated array
* with their basic names as the keys.
* @return Entity[]
*/
public function all()
{
return [
'bookshelf' => $this->bookshelf,
'book' => $this->book,
'chapter' => $this->chapter,
'page' => $this->page,
];
}
} }

View file

@ -1,18 +1,11 @@
<?php namespace BookStack\Entities; <?php namespace BookStack\Entities;
use BookStack\Entities\Book; use BookStack\Actions\TagRepo;
use BookStack\Entities\Bookshelf; use BookStack\Actions\ViewService;
use BookStack\Entities\Chapter; use BookStack\Auth\Permissions\PermissionService;
use BookStack\Entities\Entity;
use BookStack\Exceptions\NotFoundException; use BookStack\Exceptions\NotFoundException;
use BookStack\Exceptions\NotifyException; use BookStack\Exceptions\NotifyException;
use BookStack\Entities\Page;
use BookStack\Entities\PageRevision;
use BookStack\Actions\TagRepo;
use BookStack\Uploads\AttachmentService; use BookStack\Uploads\AttachmentService;
use BookStack\Auth\Permissions\PermissionService;
use BookStack\Entities\SearchService;
use BookStack\Actions\ViewService;
use Carbon\Carbon; use Carbon\Carbon;
use DOMDocument; use DOMDocument;
use DOMXPath; use DOMXPath;

View file

@ -1,9 +1,5 @@
<?php namespace BookStack\Entities; <?php namespace BookStack\Entities;
use BookStack\Entities\Book;
use BookStack\Entities\Chapter;
use BookStack\Entities\Page;
use BookStack\Entities\EntityRepo;
use BookStack\Uploads\ImageService; use BookStack\Uploads\ImageService;
class ExportService class ExportService
@ -14,7 +10,8 @@ class ExportService
/** /**
* ExportService constructor. * ExportService constructor.
* @param $entityRepo * @param EntityRepo $entityRepo
* @param ImageService $imageService
*/ */
public function __construct(EntityRepo $entityRepo, ImageService $imageService) public function __construct(EntityRepo $entityRepo, ImageService $imageService)
{ {

View file

@ -1,10 +1,6 @@
<?php namespace BookStack\Entities; <?php namespace BookStack\Entities;
use BookStack\Uploads\Attachment; use BookStack\Uploads\Attachment;
use BookStack\Entities\Book;
use BookStack\Entities\Chapter;
use BookStack\Entities\Entity;
use BookStack\Entities\PageRevision;
class Page extends Entity class Page extends Entity
{ {

View file

@ -1,8 +1,7 @@
<?php namespace BookStack\Entities; <?php namespace BookStack\Entities;
use BookStack\Entities\Page;
use BookStack\Model;
use BookStack\Auth\User; use BookStack\Auth\User;
use BookStack\Model;
class PageRevision extends Model class PageRevision extends Model
{ {

View file

@ -1,11 +1,5 @@
<?php namespace BookStack\Entities; <?php namespace BookStack\Entities;
use BookStack\Entities\Book;
use BookStack\Entities\Bookshelf;
use BookStack\Entities\Chapter;
use BookStack\Entities\Entity;
use BookStack\Entities\Page;
use BookStack\Entities\SearchTerm;
use BookStack\Auth\Permissions\PermissionService; use BookStack\Auth\Permissions\PermissionService;
use Illuminate\Database\Connection; use Illuminate\Database\Connection;
use Illuminate\Database\Query\Builder; use Illuminate\Database\Query\Builder;

View file

@ -3,12 +3,12 @@
namespace BookStack\Exceptions; namespace BookStack\Exceptions;
use Exception; use Exception;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Validation\ValidationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Validation\ValidationException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler

View file

@ -1,9 +1,9 @@
<?php namespace BookStack\Http\Controllers; <?php namespace BookStack\Http\Controllers;
use BookStack\Exceptions\FileUploadException;
use BookStack\Uploads\Attachment;
use BookStack\Exceptions\NotFoundException;
use BookStack\Entities\EntityRepo; use BookStack\Entities\EntityRepo;
use BookStack\Exceptions\FileUploadException;
use BookStack\Exceptions\NotFoundException;
use BookStack\Uploads\Attachment;
use BookStack\Uploads\AttachmentService; use BookStack\Uploads\AttachmentService;
use Illuminate\Http\Request; use Illuminate\Http\Request;

View file

@ -2,11 +2,11 @@
namespace BookStack\Http\Controllers\Auth; namespace BookStack\Http\Controllers\Auth;
use BookStack\Exceptions\AuthException;
use BookStack\Http\Controllers\Controller;
use BookStack\Auth\UserRepo;
use BookStack\Auth\Access\LdapService; use BookStack\Auth\Access\LdapService;
use BookStack\Auth\Access\SocialAuthService; use BookStack\Auth\Access\SocialAuthService;
use BookStack\Auth\UserRepo;
use BookStack\Exceptions\AuthException;
use BookStack\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request; use Illuminate\Http\Request;

View file

@ -2,21 +2,19 @@
namespace BookStack\Http\Controllers\Auth; namespace BookStack\Http\Controllers\Auth;
use BookStack\Auth\SocialAccount;
use BookStack\Auth\User;
use BookStack\Auth\UserRepo;
use BookStack\Exceptions\SocialSignInAccountNotUsed; use BookStack\Exceptions\SocialSignInAccountNotUsed;
use BookStack\Exceptions\SocialSignInException; use BookStack\Exceptions\SocialSignInException;
use BookStack\Exceptions\UserRegistrationException; use BookStack\Exceptions\UserRegistrationException;
use BookStack\Auth\UserRepo; use BookStack\Http\Controllers\Controller;
use BookStack\Auth\Access\EmailConfirmationService;
use BookStack\Auth\Access\SocialAuthService;
use BookStack\Auth\SocialAccount;
use BookStack\Auth\User;
use Exception; use Exception;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;
use Validator;
use BookStack\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RegistersUsers;
use Laravel\Socialite\Contracts\User as SocialUser; use Laravel\Socialite\Contracts\User as SocialUser;
use Validator;
class RegisterController extends Controller class RegisterController extends Controller
{ {

View file

@ -1,9 +1,9 @@
<?php namespace BookStack\Http\Controllers; <?php namespace BookStack\Http\Controllers;
use Activity; use Activity;
use BookStack\Auth\UserRepo;
use BookStack\Entities\Book; use BookStack\Entities\Book;
use BookStack\Entities\EntityRepo; use BookStack\Entities\EntityRepo;
use BookStack\Auth\UserRepo;
use BookStack\Entities\ExportService; use BookStack\Entities\ExportService;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;

View file

@ -1,10 +1,9 @@
<?php namespace BookStack\Http\Controllers; <?php namespace BookStack\Http\Controllers;
use Activity; use Activity;
use BookStack\Entities\Book; use BookStack\Auth\UserRepo;
use BookStack\Entities\Bookshelf; use BookStack\Entities\Bookshelf;
use BookStack\Entities\EntityRepo; use BookStack\Entities\EntityRepo;
use BookStack\Auth\UserRepo;
use BookStack\Entities\ExportService; use BookStack\Entities\ExportService;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;

View file

@ -1,8 +1,8 @@
<?php namespace BookStack\Http\Controllers; <?php namespace BookStack\Http\Controllers;
use Activity; use Activity;
use BookStack\Entities\EntityRepo;
use BookStack\Auth\UserRepo; use BookStack\Auth\UserRepo;
use BookStack\Entities\EntityRepo;
use BookStack\Entities\ExportService; use BookStack\Entities\ExportService;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;

View file

@ -2,13 +2,13 @@
namespace BookStack\Http\Controllers; namespace BookStack\Http\Controllers;
use BookStack\Auth\User;
use BookStack\Ownable; use BookStack\Ownable;
use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Http\Exceptions\HttpResponseException; use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController; use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use BookStack\Auth\User;
abstract class Controller extends BaseController abstract class Controller extends BaseController
{ {

View file

@ -2,7 +2,6 @@
use Activity; use Activity;
use BookStack\Entities\EntityRepo; use BookStack\Entities\EntityRepo;
use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;
use Views; use Views;

View file

@ -1,13 +1,12 @@
<?php namespace BookStack\Http\Controllers; <?php namespace BookStack\Http\Controllers;
use BookStack\Exceptions\ImageUploadException;
use BookStack\Exceptions\NotFoundException;
use BookStack\Entities\EntityRepo; use BookStack\Entities\EntityRepo;
use BookStack\Exceptions\ImageUploadException;
use BookStack\Repos\PageRepo;
use BookStack\Uploads\Image;
use BookStack\Uploads\ImageRepo; use BookStack\Uploads\ImageRepo;
use Illuminate\Filesystem\Filesystem as File; use Illuminate\Filesystem\Filesystem as File;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use BookStack\Uploads\Image;
use BookStack\Repos\PageRepo;
class ImageController extends Controller class ImageController extends Controller
{ {

View file

@ -1,14 +1,14 @@
<?php namespace BookStack\Http\Controllers; <?php namespace BookStack\Http\Controllers;
use Activity; use Activity;
use BookStack\Exceptions\NotFoundException;
use BookStack\Entities\EntityRepo;
use BookStack\Auth\UserRepo; use BookStack\Auth\UserRepo;
use BookStack\Entities\EntityRepo;
use BookStack\Entities\ExportService; use BookStack\Entities\ExportService;
use BookStack\Exceptions\NotFoundException;
use GatherContent\Htmldiff\Htmldiff;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;
use Views; use Views;
use GatherContent\Htmldiff\Htmldiff;
class PageController extends Controller class PageController extends Controller
{ {

View file

@ -1,7 +1,7 @@
<?php namespace BookStack\Http\Controllers; <?php namespace BookStack\Http\Controllers;
use BookStack\Exceptions\PermissionsException;
use BookStack\Auth\Permissions\PermissionsRepo; use BookStack\Auth\Permissions\PermissionsRepo;
use BookStack\Exceptions\PermissionsException;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class PermissionController extends Controller class PermissionController extends Controller

View file

@ -1,8 +1,8 @@
<?php namespace BookStack\Http\Controllers; <?php namespace BookStack\Http\Controllers;
use BookStack\Actions\ViewService;
use BookStack\Entities\EntityRepo; use BookStack\Entities\EntityRepo;
use BookStack\Entities\SearchService; use BookStack\Entities\SearchService;
use BookStack\Actions\ViewService;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class SearchController extends Controller class SearchController extends Controller

View file

@ -1,11 +1,10 @@
<?php namespace BookStack\Http\Controllers; <?php namespace BookStack\Http\Controllers;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use BookStack\Auth\UserRepo;
use BookStack\Auth\Access\SocialAuthService; use BookStack\Auth\Access\SocialAuthService;
use BookStack\Auth\User; use BookStack\Auth\User;
use BookStack\Auth\UserRepo;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class UserController extends Controller class UserController extends Controller
{ {

View file

@ -3,8 +3,8 @@
namespace BookStack\Http\Middleware; namespace BookStack\Http\Middleware;
use Closure; use Closure;
use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware; use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware class TrustProxies extends Middleware
{ {

View file

@ -3,9 +3,9 @@
namespace BookStack\Notifications; namespace BookStack\Notifications;
use Illuminate\Bus\Queueable; use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class ConfirmEmail extends Notification implements ShouldQueue class ConfirmEmail extends Notification implements ShouldQueue
{ {

View file

@ -2,8 +2,8 @@
namespace BookStack\Notifications; namespace BookStack\Notifications;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage; use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
class ResetPassword extends Notification class ResetPassword extends Notification
{ {

View file

@ -5,8 +5,8 @@ use BookStack\Entities\Book;
use BookStack\Entities\Bookshelf; use BookStack\Entities\Bookshelf;
use BookStack\Entities\Chapter; use BookStack\Entities\Chapter;
use BookStack\Entities\Page; use BookStack\Entities\Page;
use BookStack\Settings\SettingService;
use BookStack\Settings\Setting; use BookStack\Settings\Setting;
use BookStack\Settings\SettingService;
use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Schema; use Schema;

View file

@ -3,7 +3,6 @@
namespace BookStack\Providers; namespace BookStack\Providers;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
class BroadcastServiceProvider extends ServiceProvider class BroadcastServiceProvider extends ServiceProvider
{ {

View file

@ -3,17 +3,17 @@
namespace BookStack\Providers; namespace BookStack\Providers;
use BookStack\Actions\Activity; use BookStack\Actions\Activity;
use BookStack\Actions\ActivityService;
use BookStack\Actions\View;
use BookStack\Actions\ViewService;
use BookStack\Auth\Permissions\PermissionService;
use BookStack\Settings\Setting;
use BookStack\Settings\SettingService;
use BookStack\Uploads\Image; use BookStack\Uploads\Image;
use BookStack\Uploads\ImageService; use BookStack\Uploads\ImageService;
use BookStack\Auth\Permissions\PermissionService;
use BookStack\Actions\ViewService;
use BookStack\Settings\Setting;
use BookStack\Actions\View;
use Illuminate\Contracts\Cache\Repository; use Illuminate\Contracts\Cache\Repository;
use Illuminate\Contracts\Filesystem\Factory; use Illuminate\Contracts\Filesystem\Factory;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use BookStack\Actions\ActivityService;
use BookStack\Settings\SettingService;
use Intervention\Image\ImageManager; use Intervention\Image\ImageManager;
class CustomFacadeProvider extends ServiceProvider class CustomFacadeProvider extends ServiceProvider

View file

@ -2,7 +2,6 @@
namespace BookStack\Providers; namespace BookStack\Providers;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use SocialiteProviders\Manager\SocialiteWasCalled; use SocialiteProviders\Manager\SocialiteWasCalled;

View file

@ -2,9 +2,7 @@
namespace BookStack\Providers; namespace BookStack\Providers;
use BookStack\Auth\Role;
use BookStack\Auth\Access\LdapService; use BookStack\Auth\Access\LdapService;
use BookStack\Auth\User;
use Illuminate\Contracts\Auth\Authenticatable; use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Contracts\Auth\UserProvider; use Illuminate\Contracts\Auth\UserProvider;

View file

@ -2,7 +2,6 @@
namespace BookStack\Providers; namespace BookStack\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Route; use Route;

View file

@ -1,7 +1,5 @@
<?php namespace BookStack\Settings; <?php namespace BookStack\Settings;
use BookStack\Settings\Setting;
use BookStack\Auth\User;
use Illuminate\Contracts\Cache\Repository as Cache; use Illuminate\Contracts\Cache\Repository as Cache;
/** /**

View file

@ -1,8 +1,6 @@
<?php namespace BookStack\Uploads; <?php namespace BookStack\Uploads;
use BookStack\Exceptions\FileUploadException; use BookStack\Exceptions\FileUploadException;
use BookStack\Uploads\Attachment;
use BookStack\Uploads\UploadService;
use Exception; use Exception;
use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\File\UploadedFile;

View file

@ -1,9 +1,7 @@
<?php namespace BookStack\Uploads; <?php namespace BookStack\Uploads;
use BookStack\Uploads\Image;
use BookStack\Entities\Page;
use BookStack\Uploads\ImageService;
use BookStack\Auth\Permissions\PermissionService; use BookStack\Auth\Permissions\PermissionService;
use BookStack\Entities\Page;
use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\File\UploadedFile;
class ImageRepo class ImageRepo

View file

@ -1,15 +1,13 @@
<?php namespace BookStack\Uploads; <?php namespace BookStack\Uploads;
use BookStack\Exceptions\ImageUploadException;
use BookStack\Uploads\Image;
use BookStack\Auth\User; use BookStack\Auth\User;
use BookStack\Uploads\UploadService; use BookStack\Exceptions\ImageUploadException;
use DB; use DB;
use Exception; use Exception;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Contracts\Filesystem\Factory as FileSystem;
use Intervention\Image\Exception\NotSupportedException; use Intervention\Image\Exception\NotSupportedException;
use Intervention\Image\ImageManager; use Intervention\Image\ImageManager;
use Illuminate\Contracts\Filesystem\Factory as FileSystem;
use Illuminate\Contracts\Cache\Repository as Cache;
use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\File\UploadedFile;
class ImageService extends UploadService class ImageService extends UploadService