]> BookStack Code Mirror - bookstack/commitdiff
Fleshed out entity provided and optimized imports
authorDan Brown <redacted>
Tue, 25 Sep 2018 15:58:03 +0000 (16:58 +0100)
committerDan Brown <redacted>
Tue, 25 Sep 2018 15:58:03 +0000 (16:58 +0100)
49 files changed:
app/Actions/ActivityService.php
app/Actions/CommentRepo.php
app/Actions/TagRepo.php
app/Auth/Access/EmailConfirmationService.php
app/Auth/Access/LdapService.php
app/Auth/Access/SocialAuthService.php
app/Auth/Permissions/JointPermission.php
app/Auth/Permissions/PermissionService.php
app/Auth/Permissions/PermissionsRepo.php
app/Auth/Role.php
app/Auth/SocialAccount.php
app/Auth/User.php
app/Auth/UserRepo.php
app/Entities/Book.php
app/Entities/Chapter.php
app/Entities/Entity.php
app/Entities/EntityProvider.php
app/Entities/EntityRepo.php
app/Entities/ExportService.php
app/Entities/Page.php
app/Entities/PageRevision.php
app/Entities/SearchService.php
app/Exceptions/Handler.php
app/Http/Controllers/AttachmentController.php
app/Http/Controllers/Auth/LoginController.php
app/Http/Controllers/Auth/RegisterController.php
app/Http/Controllers/BookController.php
app/Http/Controllers/BookshelfController.php
app/Http/Controllers/ChapterController.php
app/Http/Controllers/Controller.php
app/Http/Controllers/HomeController.php
app/Http/Controllers/ImageController.php
app/Http/Controllers/PageController.php
app/Http/Controllers/PermissionController.php
app/Http/Controllers/SearchController.php
app/Http/Controllers/UserController.php
app/Http/Middleware/TrustProxies.php
app/Notifications/ConfirmEmail.php
app/Notifications/ResetPassword.php
app/Providers/AppServiceProvider.php
app/Providers/BroadcastServiceProvider.php
app/Providers/CustomFacadeProvider.php
app/Providers/EventServiceProvider.php
app/Providers/LdapUserProvider.php
app/Providers/RouteServiceProvider.php
app/Settings/SettingService.php
app/Uploads/AttachmentService.php
app/Uploads/ImageRepo.php
app/Uploads/ImageService.php

index 7b1046d220d34e14b0393420f80868229db1d284..37cd0a6a4ca99a2a1f60f682929fefabe5bfb304 100644 (file)
@@ -1,6 +1,5 @@
 <?php namespace BookStack\Actions;
 
-use BookStack\Actions\Activity;
 use BookStack\Auth\Permissions\PermissionService;
 use BookStack\Entities\Entity;
 use Session;
index 3422d141ba05ccec7d1bdf2eb8bdb716057ec9fe..5ff639e2eb7275aefb281ef7b6e5c029a4e4ae62 100644 (file)
@@ -1,6 +1,5 @@
 <?php namespace BookStack\Actions;
 
-use BookStack\Actions\Comment;
 use BookStack\Entities\Entity;
 
 /**
index 87023674cb8957608ca94ed5f034116512672102..0cbfa4163bf9120226aafea71e678a4f13b920a8 100644 (file)
@@ -1,7 +1,7 @@
 <?php namespace BookStack\Actions;
 
-use BookStack\Entities\Entity;
 use BookStack\Auth\Permissions\PermissionService;
+use BookStack\Entities\Entity;
 
 /**
  * Class TagRepo
index b14eb8c3f34d926ffbdb24dd648a476020406c19..4df014116c5c3d1c393e6e4594923c0d65a5d519 100644 (file)
@@ -1,11 +1,11 @@
 <?php namespace BookStack\Auth\Access;
 
-use BookStack\Notifications\ConfirmEmail;
+use BookStack\Auth\User;
 use BookStack\Auth\UserRepo;
-use Carbon\Carbon;
 use BookStack\Exceptions\ConfirmationEmailException;
 use BookStack\Exceptions\UserRegistrationException;
-use BookStack\Auth\User;
+use BookStack\Notifications\ConfirmEmail;
+use Carbon\Carbon;
 use Illuminate\Database\Connection as Database;
 
 class EmailConfirmationService
index 4fbf29365d758565f53048c56bdce0a96f727887..d3a177f8e1dffbac095e4d504550b646182eb690 100644 (file)
@@ -1,11 +1,10 @@
 <?php namespace BookStack\Auth\Access;
 
 use BookStack\Auth\Access;
-use BookStack\Exceptions\LdapException;
-use BookStack\Auth\UserRepo;
 use BookStack\Auth\Role;
 use BookStack\Auth\User;
-use BookStack\Auth\Access\Ldap;
+use BookStack\Auth\UserRepo;
+use BookStack\Exceptions\LdapException;
 use Illuminate\Contracts\Auth\Authenticatable;
 use Illuminate\Database\Eloquent\Builder;
 
index 005380f5bda18b94ecea86af939d824863402610..87db1d5c6d4f1bfeadfb28c173da36e777b1b6a9 100644 (file)
@@ -1,11 +1,11 @@
 <?php namespace BookStack\Auth\Access;
 
-use BookStack\Exceptions\SocialSignInAccountNotUsed;
-use Laravel\Socialite\Contracts\Factory as Socialite;
+use BookStack\Auth\SocialAccount;
+use BookStack\Auth\UserRepo;
 use BookStack\Exceptions\SocialDriverNotConfigured;
+use BookStack\Exceptions\SocialSignInAccountNotUsed;
 use BookStack\Exceptions\UserRegistrationException;
-use BookStack\Auth\UserRepo;
-use BookStack\Auth\SocialAccount;
+use Laravel\Socialite\Contracts\Factory as Socialite;
 use Laravel\Socialite\Contracts\User as SocialUser;
 
 class SocialAuthService
index 71c1979fcf579516c6527cacb29c6c1f027ebf14..c48549b8f00c5cac2e9996fa9c4c4e0d483af365 100644 (file)
@@ -1,8 +1,8 @@
 <?php namespace BookStack\Auth\Permissions;
 
+use BookStack\Auth\Role;
 use BookStack\Entities\Entity;
 use BookStack\Model;
-use BookStack\Auth\Role;
 
 class JointPermission extends Model
 {
index aae3980c13e78668024b98ba5628f4d550c7c0dd..a4b9103babe53dd574d5995a6e136b6e7711d121 100644 (file)
@@ -1,16 +1,13 @@
 <?php namespace BookStack\Auth\Permissions;
 
 use BookStack\Auth\Permissions;
+use BookStack\Auth\Role;
 use BookStack\Entities\Book;
 use BookStack\Entities\Bookshelf;
 use BookStack\Entities\Chapter;
 use BookStack\Entities\Entity;
-use BookStack\Auth\Permissions\EntityPermission;
-use BookStack\Auth\Permissions\JointPermission;
-use BookStack\Ownable;
 use BookStack\Entities\Page;
-use BookStack\Auth\Role;
-use BookStack\Auth\User;
+use BookStack\Ownable;
 use Illuminate\Database\Connection;
 use Illuminate\Database\Eloquent\Builder;
 use Illuminate\Database\Query\Builder as QueryBuilder;
index 98a8a9f14336ae48bd56171096b05d8761ea3ef1..18d5089bec2f89dcaea0d9258a448d9463041b1b 100644 (file)
@@ -1,11 +1,8 @@
 <?php namespace BookStack\Auth\Permissions;
 
 use BookStack\Auth\Permissions;
-use BookStack\Exceptions\PermissionsException;
-use BookStack\Auth\Permissions\RolePermission;
 use BookStack\Auth\Role;
-use BookStack\Auth\Permissions\PermissionService;
-use Setting;
+use BookStack\Exceptions\PermissionsException;
 
 class PermissionsRepo
 {
index b32954767086ed5808a161d527bb586739472201..c8bb47e4582076ef90769a03a7f72b8e1e605ca4 100644 (file)
@@ -2,7 +2,6 @@
 
 use BookStack\Auth\Permissions\JointPermission;
 use BookStack\Model;
-use BookStack\Auth\Permissions\RolePermission;
 
 class Role extends Model
 {
index 7d0dbaafc60245a5247e5b61a8f66db2ef327371..804dbe6292973c16b7dc068ad00dd353c33fa48d 100644 (file)
@@ -1,6 +1,5 @@
 <?php namespace BookStack\Auth;
 
-use BookStack\Auth\User;
 use BookStack\Model;
 
 class SocialAccount extends Model
index 0f3de122c91a00f3a1f3df0190059127bcc5ff57..05e77e13d0e4a84e45f0f1f0fd90bdd22bb8e683 100644 (file)
@@ -1,10 +1,8 @@
 <?php namespace BookStack\Auth;
 
-use BookStack\Uploads\Image;
 use BookStack\Model;
 use BookStack\Notifications\ResetPassword;
-use BookStack\Auth\Role;
-use BookStack\Auth\SocialAccount;
+use BookStack\Uploads\Image;
 use Illuminate\Auth\Authenticatable;
 use Illuminate\Auth\Passwords\CanResetPassword;
 use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
index 87c0328d6ffcc6d33fdfb1a87f00ad7a70e7d65e..a46aba8db68f0afb3c48adade718c1a0c369f272 100644 (file)
@@ -4,8 +4,6 @@ use Activity;
 use BookStack\Entities\EntityRepo;
 use BookStack\Exceptions\NotFoundException;
 use BookStack\Uploads\Image;
-use BookStack\Auth\Role;
-use BookStack\Auth\User;
 use Exception;
 use Images;
 
index b8a29322d6b58f52bc142104312e79209a935f0b..5ab5142c9f097d5c654f5d99e08b8d2efad2d113 100644 (file)
@@ -1,7 +1,6 @@
 <?php namespace BookStack\Entities;
 
 use BookStack\Uploads\Image;
-use BookStack\Entities\Page;
 
 class Book extends Entity
 {
index 8638e3c9e4f6854cc83cf810283a24e1d64a3770..079105ba92a7a5c0d18bdc4ac31085610c8d4ae2 100644 (file)
@@ -1,9 +1,5 @@
 <?php namespace BookStack\Entities;
 
-use BookStack\Entities\Book;
-use BookStack\Entities\Entity;
-use BookStack\Entities\Page;
-
 class Chapter extends Entity
 {
     public $searchFactor = 1.3;
index 87d679fdbeea60578bb6a7fd9894a5232c04545c..24c80afc5d0512fab76fb3a6dd21bf87ad39af3c 100644 (file)
@@ -2,11 +2,11 @@
 
 use BookStack\Actions\Activity;
 use BookStack\Actions\Comment;
+use BookStack\Actions\Tag;
+use BookStack\Actions\View;
 use BookStack\Auth\Permissions\EntityPermission;
 use BookStack\Auth\Permissions\JointPermission;
 use BookStack\Ownable;
-use BookStack\Actions\Tag;
-use BookStack\Actions\View;
 use Illuminate\Database\Eloquent\Relations\MorphMany;
 
 class Entity extends Ownable
index 51e3ad06009d0df58a4549e991b94f92cb970720..0442b9f44b98b850b21793dda58436018470925c 100644 (file)
@@ -1,7 +1,78 @@
 <?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
 {
-    // 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,
+        ];
+    }
+
+
 }
\ No newline at end of file
index 2031807eee02fb7ceb4347c18626e505ef0591d3..e2fe2307e1aaebad45bdd6626c1b23abc876fe12 100644 (file)
@@ -1,18 +1,11 @@
 <?php namespace BookStack\Entities;
 
-use BookStack\Entities\Book;
-use BookStack\Entities\Bookshelf;
-use BookStack\Entities\Chapter;
-use BookStack\Entities\Entity;
+use BookStack\Actions\TagRepo;
+use BookStack\Actions\ViewService;
+use BookStack\Auth\Permissions\PermissionService;
 use BookStack\Exceptions\NotFoundException;
 use BookStack\Exceptions\NotifyException;
-use BookStack\Entities\Page;
-use BookStack\Entities\PageRevision;
-use BookStack\Actions\TagRepo;
 use BookStack\Uploads\AttachmentService;
-use BookStack\Auth\Permissions\PermissionService;
-use BookStack\Entities\SearchService;
-use BookStack\Actions\ViewService;
 use Carbon\Carbon;
 use DOMDocument;
 use DOMXPath;
index fc0e4d11491185ce19fb0fc8f44ad19c3a8cb7a9..e12e14f8bda4e2211dab5db713222ce0c6bea51b 100644 (file)
@@ -1,9 +1,5 @@
 <?php namespace BookStack\Entities;
 
-use BookStack\Entities\Book;
-use BookStack\Entities\Chapter;
-use BookStack\Entities\Page;
-use BookStack\Entities\EntityRepo;
 use BookStack\Uploads\ImageService;
 
 class ExportService
@@ -14,7 +10,8 @@ class ExportService
 
     /**
      * ExportService constructor.
-     * @param $entityRepo
+     * @param EntityRepo $entityRepo
+     * @param ImageService $imageService
      */
     public function __construct(EntityRepo $entityRepo, ImageService $imageService)
     {
index 59de338cb79494e3de328d8cb7fdbe680ed07a0d..ea7df16f4021025b048f91dd4e26f50741310e46 100644 (file)
@@ -1,10 +1,6 @@
 <?php namespace BookStack\Entities;
 
 use BookStack\Uploads\Attachment;
-use BookStack\Entities\Book;
-use BookStack\Entities\Chapter;
-use BookStack\Entities\Entity;
-use BookStack\Entities\PageRevision;
 
 class Page extends Entity
 {
index 502a71588134ebdb02960213d3e9800da6394fef..d30147bfc52b1789f2faf4ecf89d8e3b50345c09 100644 (file)
@@ -1,8 +1,7 @@
 <?php namespace BookStack\Entities;
 
-use BookStack\Entities\Page;
-use BookStack\Model;
 use BookStack\Auth\User;
+use BookStack\Model;
 
 class PageRevision extends Model
 {
index 0bfdab7eabe2c7237084b3a545fe7730b3ca9bdb..91e8a28e99d246ba701ba1a5f95b80ee1019bcab 100644 (file)
@@ -1,11 +1,5 @@
 <?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 Illuminate\Database\Connection;
 use Illuminate\Database\Query\Builder;
index 0eb62dc31aab20388e8047a39788ee0c3990e4dc..70a53497599d36216ae82bcdd787ab1901247043 100644 (file)
@@ -3,12 +3,12 @@
 namespace BookStack\Exceptions;
 
 use Exception;
+use Illuminate\Auth\Access\AuthorizationException;
 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\Validation\ValidationException;
+use Symfony\Component\HttpKernel\Exception\HttpException;
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
 
 class Handler extends ExceptionHandler
index 535543177c7c925e5bd74203427f097075d28dd5..14a1b9f3a6c48281484a90fa9eb039961487e8eb 100644 (file)
@@ -1,9 +1,9 @@
 <?php namespace BookStack\Http\Controllers;
 
+use BookStack\Entities\EntityRepo;
 use BookStack\Exceptions\FileUploadException;
-use BookStack\Uploads\Attachment;
 use BookStack\Exceptions\NotFoundException;
-use BookStack\Entities\EntityRepo;
+use BookStack\Uploads\Attachment;
 use BookStack\Uploads\AttachmentService;
 use Illuminate\Http\Request;
 
index 8ef46c2985a49ee6f720aab8279dd4f67553b749..e820154e71be2f85b0d771d54b7ae03627022808 100644 (file)
@@ -2,11 +2,11 @@
 
 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\SocialAuthService;
+use BookStack\Auth\UserRepo;
+use BookStack\Exceptions\AuthException;
+use BookStack\Http\Controllers\Controller;
 use Illuminate\Contracts\Auth\Authenticatable;
 use Illuminate\Foundation\Auth\AuthenticatesUsers;
 use Illuminate\Http\Request;
index dd60c741681e7c98239fa92356a00ccbd748bf88..cdcca116ccd13a382e019dbcc424231e944065ad 100644 (file)
@@ -2,21 +2,19 @@
 
 namespace BookStack\Http\Controllers\Auth;
 
+use BookStack\Auth\SocialAccount;
+use BookStack\Auth\User;
+use BookStack\Auth\UserRepo;
 use BookStack\Exceptions\SocialSignInAccountNotUsed;
 use BookStack\Exceptions\SocialSignInException;
 use BookStack\Exceptions\UserRegistrationException;
-use BookStack\Auth\UserRepo;
-use BookStack\Auth\Access\EmailConfirmationService;
-use BookStack\Auth\Access\SocialAuthService;
-use BookStack\Auth\SocialAccount;
-use BookStack\Auth\User;
+use BookStack\Http\Controllers\Controller;
 use Exception;
+use Illuminate\Foundation\Auth\RegistersUsers;
 use Illuminate\Http\Request;
 use Illuminate\Http\Response;
-use Validator;
-use BookStack\Http\Controllers\Controller;
-use Illuminate\Foundation\Auth\RegistersUsers;
 use Laravel\Socialite\Contracts\User as SocialUser;
+use Validator;
 
 class RegisterController extends Controller
 {
index 045bcd344280bd8ed689864e1deb188a770b5627..5a9eadaf884565d222783e306706d4310a1ae0ea 100644 (file)
@@ -1,9 +1,9 @@
 <?php namespace BookStack\Http\Controllers;
 
 use Activity;
+use BookStack\Auth\UserRepo;
 use BookStack\Entities\Book;
 use BookStack\Entities\EntityRepo;
-use BookStack\Auth\UserRepo;
 use BookStack\Entities\ExportService;
 use Illuminate\Http\Request;
 use Illuminate\Http\Response;
index c1938d75480593b88a707fa3bf1aaf57370a1140..09dd468d0b95c393d9acd86496e08e2bf53b36a9 100644 (file)
@@ -1,10 +1,9 @@
 <?php namespace BookStack\Http\Controllers;
 
 use Activity;
-use BookStack\Entities\Book;
+use BookStack\Auth\UserRepo;
 use BookStack\Entities\Bookshelf;
 use BookStack\Entities\EntityRepo;
-use BookStack\Auth\UserRepo;
 use BookStack\Entities\ExportService;
 use Illuminate\Http\Request;
 use Illuminate\Http\Response;
index a3f26f7cde79f9ffb1d48a64abd91853c6b7b4f8..88a89ebf35c3671cd39b963d074981624456abf1 100644 (file)
@@ -1,8 +1,8 @@
 <?php namespace BookStack\Http\Controllers;
 
 use Activity;
-use BookStack\Entities\EntityRepo;
 use BookStack\Auth\UserRepo;
+use BookStack\Entities\EntityRepo;
 use BookStack\Entities\ExportService;
 use Illuminate\Http\Request;
 use Illuminate\Http\Response;
index 9c1527e98c31d6882c13b8e33de5ebe42afc3d83..80f567eaa80279e8f49599f9703f5ab29e6276c3 100644 (file)
@@ -2,13 +2,13 @@
 
 namespace BookStack\Http\Controllers;
 
+use BookStack\Auth\User;
 use BookStack\Ownable;
 use Illuminate\Foundation\Bus\DispatchesJobs;
+use Illuminate\Foundation\Validation\ValidatesRequests;
 use Illuminate\Http\Exceptions\HttpResponseException;
 use Illuminate\Http\Request;
 use Illuminate\Routing\Controller as BaseController;
-use Illuminate\Foundation\Validation\ValidatesRequests;
-use BookStack\Auth\User;
 
 abstract class Controller extends BaseController
 {
index e9469fafb0c9a24c7af2355ceba65e2c0df8312b..4d536c1b3461fde0ae136a8afa47fa7ffceea359 100644 (file)
@@ -2,7 +2,6 @@
 
 use Activity;
 use BookStack\Entities\EntityRepo;
-use Illuminate\Http\Request;
 use Illuminate\Http\Response;
 use Views;
 
index a64608e8e2971729cecfb3b7d87beb859f870286..33ff5d236bfc242f855385f6f123a6f137d26ea8 100644 (file)
@@ -1,13 +1,12 @@
 <?php namespace BookStack\Http\Controllers;
 
-use BookStack\Exceptions\ImageUploadException;
-use BookStack\Exceptions\NotFoundException;
 use BookStack\Entities\EntityRepo;
+use BookStack\Exceptions\ImageUploadException;
+use BookStack\Repos\PageRepo;
+use BookStack\Uploads\Image;
 use BookStack\Uploads\ImageRepo;
 use Illuminate\Filesystem\Filesystem as File;
 use Illuminate\Http\Request;
-use BookStack\Uploads\Image;
-use BookStack\Repos\PageRepo;
 
 class ImageController extends Controller
 {
index df854973980a0b9b08e6e7dee8e5b277ba180f5f..e010077bdc0c38fcbebebfe8e62cef1c659cc818 100644 (file)
@@ -1,14 +1,14 @@
 <?php namespace BookStack\Http\Controllers;
 
 use Activity;
-use BookStack\Exceptions\NotFoundException;
-use BookStack\Entities\EntityRepo;
 use BookStack\Auth\UserRepo;
+use BookStack\Entities\EntityRepo;
 use BookStack\Entities\ExportService;
+use BookStack\Exceptions\NotFoundException;
+use GatherContent\Htmldiff\Htmldiff;
 use Illuminate\Http\Request;
 use Illuminate\Http\Response;
 use Views;
-use GatherContent\Htmldiff\Htmldiff;
 
 class PageController extends Controller
 {
index 215184b73fdb0694bcb06b46212ab4047b6cd1ff..9be343c9a76011a5bd5b7a872ad78b1e6a9a8d3c 100644 (file)
@@ -1,7 +1,7 @@
 <?php namespace BookStack\Http\Controllers;
 
-use BookStack\Exceptions\PermissionsException;
 use BookStack\Auth\Permissions\PermissionsRepo;
+use BookStack\Exceptions\PermissionsException;
 use Illuminate\Http\Request;
 
 class PermissionController extends Controller
index 6ae08a280bd698b39f9809cef206a6e2b15d9c6c..4402b7caf310e0f142a72f1fad724d4ebe34d432 100644 (file)
@@ -1,8 +1,8 @@
 <?php namespace BookStack\Http\Controllers;
 
+use BookStack\Actions\ViewService;
 use BookStack\Entities\EntityRepo;
 use BookStack\Entities\SearchService;
-use BookStack\Actions\ViewService;
 use Illuminate\Http\Request;
 
 class SearchController extends Controller
index 93e4c34509af04c59a669a3468afae610897397d..5f5c8365eecc34de70ef0dae569f2c20406a79e2 100644 (file)
@@ -1,11 +1,10 @@
 <?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\User;
+use BookStack\Auth\UserRepo;
+use Illuminate\Http\Request;
+use Illuminate\Http\Response;
 
 class UserController extends Controller
 {
index c3102571da2b0d515f87a7c5f42e2373c306c7b2..73c11a82769d861ed0ab1793bd7eb7473466d74b 100644 (file)
@@ -3,8 +3,8 @@
 namespace BookStack\Http\Middleware;
 
 use Closure;
-use Illuminate\Http\Request;
 use Fideloper\Proxy\TrustProxies as Middleware;
+use Illuminate\Http\Request;
 
 class TrustProxies extends Middleware
 {
index 858b12166be9411ed28fe047c739b304f9da9152..f3797e6e228874559439de231fba034fd48d45af 100644 (file)
@@ -3,9 +3,9 @@
 namespace BookStack\Notifications;
 
 use Illuminate\Bus\Queueable;
-use Illuminate\Notifications\Notification;
 use Illuminate\Contracts\Queue\ShouldQueue;
 use Illuminate\Notifications\Messages\MailMessage;
+use Illuminate\Notifications\Notification;
 
 class ConfirmEmail extends Notification implements ShouldQueue
 {
index affd8f07638330d2bc70acfbceb8e2c0150c2980..86e93228f857a64ed5965126cfd0958180665fba 100644 (file)
@@ -2,8 +2,8 @@
 
 namespace BookStack\Notifications;
 
-use Illuminate\Notifications\Notification;
 use Illuminate\Notifications\Messages\MailMessage;
+use Illuminate\Notifications\Notification;
 
 class ResetPassword extends Notification
 {
index ef4c657d9ab2e567b2db9a56c965a318b6a23203..6fa0f9a5215b7c27dd0baadbda4e044c3b24fb29 100644 (file)
@@ -5,8 +5,8 @@ use BookStack\Entities\Book;
 use BookStack\Entities\Bookshelf;
 use BookStack\Entities\Chapter;
 use BookStack\Entities\Page;
-use BookStack\Settings\SettingService;
 use BookStack\Settings\Setting;
+use BookStack\Settings\SettingService;
 use Illuminate\Database\Eloquent\Relations\Relation;
 use Illuminate\Support\ServiceProvider;
 use Schema;
index 11e3cc6d2cc24c203d057514e44ed3738c33a760..69925e945e82e6eda9dd6d3b3b7e8c75ed6da541 100644 (file)
@@ -3,7 +3,6 @@
 namespace BookStack\Providers;
 
 use Illuminate\Support\ServiceProvider;
-use Illuminate\Support\Facades\Broadcast;
 
 class BroadcastServiceProvider extends ServiceProvider
 {
index 2a5b101dbf9160a3cb8319df51976aef230339e5..98b242d219f7bac8d2f8ef6403d3f04dfd88067d 100644 (file)
@@ -3,17 +3,17 @@
 namespace BookStack\Providers;
 
 use BookStack\Actions\Activity;
-use BookStack\Uploads\Image;
-use BookStack\Uploads\ImageService;
-use BookStack\Auth\Permissions\PermissionService;
+use BookStack\Actions\ActivityService;
+use BookStack\Actions\View;
 use BookStack\Actions\ViewService;
+use BookStack\Auth\Permissions\PermissionService;
 use BookStack\Settings\Setting;
-use BookStack\Actions\View;
+use BookStack\Settings\SettingService;
+use BookStack\Uploads\Image;
+use BookStack\Uploads\ImageService;
 use Illuminate\Contracts\Cache\Repository;
 use Illuminate\Contracts\Filesystem\Factory;
 use Illuminate\Support\ServiceProvider;
-use BookStack\Actions\ActivityService;
-use BookStack\Settings\SettingService;
 use Intervention\Image\ImageManager;
 
 class CustomFacadeProvider extends ServiceProvider
index 00eeb036c177513e190c9212fd5321760d3c53fb..a826185d82de7bdfa49a7db17bbd9b4ac6c3c84b 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace BookStack\Providers;
 
-use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
 use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
 use SocialiteProviders\Manager\SocialiteWasCalled;
 
index 7f676eace26110caafc765224b65e1c33f24fa56..9c91def2f1f55b650b845f5913fa3563f47092e3 100644 (file)
@@ -2,9 +2,7 @@
 
 namespace BookStack\Providers;
 
-use BookStack\Auth\Role;
 use BookStack\Auth\Access\LdapService;
-use BookStack\Auth\User;
 use Illuminate\Contracts\Auth\Authenticatable;
 use Illuminate\Contracts\Auth\UserProvider;
 
index 88ab23526e6c54aae08b992909859109e3e31e5b..c4c39d5345fa74b80631c7e737e4f928407f32a9 100644 (file)
@@ -2,7 +2,6 @@
 
 namespace BookStack\Providers;
 
-use Illuminate\Routing\Router;
 use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
 use Route;
 
index 756640485a600708a25a83a8a13686a5dbe907fe..c903bd60a5dc4b811bcf2604965aa3692d020382 100644 (file)
@@ -1,7 +1,5 @@
 <?php namespace BookStack\Settings;
 
-use BookStack\Settings\Setting;
-use BookStack\Auth\User;
 use Illuminate\Contracts\Cache\Repository as Cache;
 
 /**
index 26e3411112a6184c9900315bd23742d3baf14d1b..7bafb6c0a26c050daab630a7f9ff692044708725 100644 (file)
@@ -1,8 +1,6 @@
 <?php namespace BookStack\Uploads;
 
 use BookStack\Exceptions\FileUploadException;
-use BookStack\Uploads\Attachment;
-use BookStack\Uploads\UploadService;
 use Exception;
 use Symfony\Component\HttpFoundation\File\UploadedFile;
 
index 194a0d583c89a9dc1a4eb079f26af2237e0c3d15..df57b13457e0ad7826650b2a7c717787e004ce5d 100644 (file)
@@ -1,9 +1,7 @@
 <?php namespace BookStack\Uploads;
 
-use BookStack\Uploads\Image;
-use BookStack\Entities\Page;
-use BookStack\Uploads\ImageService;
 use BookStack\Auth\Permissions\PermissionService;
+use BookStack\Entities\Page;
 use Symfony\Component\HttpFoundation\File\UploadedFile;
 
 class ImageRepo
index 9ecf9492e8598fd6d832ccd6f8affc4d0bddf4e3..f109db60068f5b919509a450df371bc8bd50eeee 100644 (file)
@@ -1,15 +1,13 @@
 <?php namespace BookStack\Uploads;
 
-use BookStack\Exceptions\ImageUploadException;
-use BookStack\Uploads\Image;
 use BookStack\Auth\User;
-use BookStack\Uploads\UploadService;
+use BookStack\Exceptions\ImageUploadException;
 use DB;
 use Exception;
+use Illuminate\Contracts\Cache\Repository as Cache;
+use Illuminate\Contracts\Filesystem\Factory as FileSystem;
 use Intervention\Image\Exception\NotSupportedException;
 use Intervention\Image\ImageManager;
-use Illuminate\Contracts\Filesystem\Factory as FileSystem;
-use Illuminate\Contracts\Cache\Repository as Cache;
 use Symfony\Component\HttpFoundation\File\UploadedFile;
 
 class ImageService extends UploadService