]> BookStack Code Mirror - bookstack/commitdiff
Aligned constructors across controller classes
authorDan Brown <redacted>
Sat, 21 Nov 2020 17:08:37 +0000 (17:08 +0000)
committerDan Brown <redacted>
Sat, 21 Nov 2020 17:08:37 +0000 (17:08 +0000)
Since they no longer needed to run the parent contructor
since the parent constructor was no longer needed.

32 files changed:
app/Http/Controllers/Api/BookExportApiController.php
app/Http/Controllers/Api/BookshelfApiController.php
app/Http/Controllers/Api/ChapterExportApiController.php
app/Http/Controllers/AttachmentController.php
app/Http/Controllers/Auth/ConfirmEmailController.php
app/Http/Controllers/Auth/ForgotPasswordController.php
app/Http/Controllers/Auth/LoginController.php
app/Http/Controllers/Auth/RegisterController.php
app/Http/Controllers/Auth/ResetPasswordController.php
app/Http/Controllers/Auth/Saml2Controller.php
app/Http/Controllers/Auth/UserInviteController.php
app/Http/Controllers/BookController.php
app/Http/Controllers/BookExportController.php
app/Http/Controllers/BookSortController.php
app/Http/Controllers/BookshelfController.php
app/Http/Controllers/ChapterController.php
app/Http/Controllers/ChapterExportController.php
app/Http/Controllers/CommentController.php
app/Http/Controllers/Controller.php
app/Http/Controllers/Images/DrawioImageController.php
app/Http/Controllers/Images/GalleryImageController.php
app/Http/Controllers/Images/ImageController.php
app/Http/Controllers/PageController.php
app/Http/Controllers/PageExportController.php
app/Http/Controllers/PageRevisionController.php
app/Http/Controllers/PageTemplateController.php
app/Http/Controllers/RecycleBinController.php
app/Http/Controllers/RoleController.php
app/Http/Controllers/SearchController.php
app/Http/Controllers/SettingController.php
app/Http/Controllers/TagController.php
app/Http/Controllers/UserController.php

index 31fe5250fd7e3f14d7d60b8ff51a5d4bc4c241fd..3bfa1d84f3407d7acc9d16a9d30739d9486f9e01 100644 (file)
@@ -17,7 +17,6 @@ class BookExportApiController extends ApiController
     {
         $this->bookRepo = $bookRepo;
         $this->exportService = $exportService;
-        parent::__construct();
     }
 
     /**
index 6792f9f45b7aa8f08c3e1511274d246fd7c0a8f2..212575c821de5c7f0ecee071f829e971d75de626 100644 (file)
@@ -30,7 +30,6 @@ class BookshelfApiController extends ApiController
 
     /**
      * BookshelfApiController constructor.
-     * @param BookshelfRepo $bookshelfRepo
      */
     public function __construct(BookshelfRepo $bookshelfRepo)
     {
index f19f29e9d2d752ee23182abbb0def5758e816714..a52bfdfb687f4edba08a73adb0019e2586e5c0bf 100644 (file)
@@ -17,7 +17,6 @@ class ChapterExportApiController extends ApiController
     {
         $this->chapterRepo = $chapterRepo;
         $this->exportService = $exportService;
-        parent::__construct();
     }
 
     /**
index f52143292de060b4b0eaf883c73e9d6e7adb6789..04e89ac5d1a0db18407398aabd3689951822eee8 100644 (file)
@@ -25,7 +25,6 @@ class AttachmentController extends Controller
         $this->attachmentService = $attachmentService;
         $this->attachment = $attachment;
         $this->pageRepo = $pageRepo;
-        parent::__construct();
     }
 
 
index 099558eb77fdce133b307aaac327277bc02510f8..bffeb5f61b2f2f7528b87e6ad506f4b6dded53d2 100644 (file)
@@ -21,15 +21,11 @@ class ConfirmEmailController extends Controller
 
     /**
      * Create a new controller instance.
-     *
-     * @param EmailConfirmationService $emailConfirmationService
-     * @param UserRepo $userRepo
      */
     public function __construct(EmailConfirmationService $emailConfirmationService, UserRepo $userRepo)
     {
         $this->emailConfirmationService = $emailConfirmationService;
         $this->userRepo = $userRepo;
-        parent::__construct();
     }
 
 
index 31e6d848b1309dddd0f23dc814c0496e1b9768f1..5a033c6aad57d89fe7067b1c65016c200e327439 100644 (file)
@@ -32,7 +32,6 @@ class ForgotPasswordController extends Controller
     {
         $this->middleware('guest');
         $this->middleware('guard:standard');
-        parent::__construct();
     }
 
 
index 3890da4b0c7cd6353658cce12b406f8820a5bf74..1252e6217a8b66f1bda3b405af28085a177308de 100644 (file)
@@ -46,7 +46,6 @@ class LoginController extends Controller
         $this->socialAuthService = $socialAuthService;
         $this->redirectPath = url('/');
         $this->redirectAfterLogout = url('/login');
-        parent::__construct();
     }
 
     public function username()
index 0bdeef9e6855c1337c34ff934bece9ab5d42d45d..e3d22264d5301a73c2d2bee41daa1c71209512a9 100644 (file)
@@ -51,7 +51,6 @@ class RegisterController extends Controller
 
         $this->redirectTo = url('/');
         $this->redirectPath = url('/');
-        parent::__construct();
     }
 
     /**
index 96f05db267b4f8887adb0c948a7ace8aed365753..59e9ab79baa7cb146ed7582e1fc50cd88a7d9e31 100644 (file)
@@ -34,7 +34,6 @@ class ResetPasswordController extends Controller
     {
         $this->middleware('guest');
         $this->middleware('guard:standard');
-        parent::__construct();
     }
 
     /**
index 7ffcc572bcd06dc43f003df6edb9f8c05d84720e..8a3bf065ed566b55062a184c76c7144797417060 100644 (file)
@@ -15,7 +15,6 @@ class Saml2Controller extends Controller
      */
     public function __construct(Saml2Service $samlService)
     {
-        parent::__construct();
         $this->samlService = $samlService;
         $this->middleware('guard:saml2');
     }
index c61b1c42b688e58b8c6defd8c007f8db7a099009..926458fa613ddc1073305ea5405750c7ce01e085 100644 (file)
@@ -27,8 +27,6 @@ class UserInviteController extends Controller
 
         $this->inviteService = $inviteService;
         $this->userRepo = $userRepo;
-
-        parent::__construct();
     }
 
     /**
index 74f9586aa69651b7e33613018ce56c012b521b9a..07a30996e2e3e109a12bbeaefc7ae95b8a878474 100644 (file)
@@ -22,7 +22,6 @@ class BookController extends Controller
     {
         $this->bookRepo = $bookRepo;
         $this->entityContextManager = $entityContextManager;
-        parent::__construct();
     }
 
     /**
index cfa3d6a3a3d162e9eb5d3bf19afa5eb4a4f6b7b8..9cd156ab97882cb7f320a49781ccdb1c621d4c21 100644 (file)
@@ -19,7 +19,6 @@ class BookExportController extends Controller
     {
         $this->bookRepo = $bookRepo;
         $this->exportService = $exportService;
-        parent::__construct();
     }
 
     /**
index 9375b618afaefc3c97f91d86848e55d3127b932e..6d561cfce711c105edd64041869cd3b1aea9595a 100644 (file)
@@ -18,7 +18,6 @@ class BookSortController extends Controller
     public function __construct(BookRepo $bookRepo)
     {
         $this->bookRepo = $bookRepo;
-        parent::__construct();
     }
 
     /**
index 8d2eec3487debf8bded49cfa51bc72060990cb11..3001a93f4d20677df4edb3f5164bbe23f22ea918 100644 (file)
@@ -27,7 +27,6 @@ class BookshelfController extends Controller
         $this->bookshelfRepo = $bookshelfRepo;
         $this->entityContextManager = $entityContextManager;
         $this->imageRepo = $imageRepo;
-        parent::__construct();
     }
 
     /**
index 8eba43e21778b2995bea0897f171919500d4b001..e085a0dc78a874afd74e888836a73027f137a997 100644 (file)
@@ -21,7 +21,6 @@ class ChapterController extends Controller
     public function __construct(ChapterRepo $chapterRepo)
     {
         $this->chapterRepo = $chapterRepo;
-        parent::__construct();
     }
 
     /**
index 0c86f854828b70dad5418a9b475c7262aef16612..d1c82df54a0ece283e192e3271e9a06d4fb57fc6 100644 (file)
@@ -18,7 +18,6 @@ class ChapterExportController extends Controller
     {
         $this->chapterRepo = $chapterRepo;
         $this->exportService = $exportService;
-        parent::__construct();
     }
 
     /**
index 2dc1a4de43ea0ea877d9c7107ddcd5f1ef6091cb..f8586e269d1c2ec2e475d5cf8bf219e4d4786fe7 100644 (file)
@@ -14,7 +14,6 @@ class CommentController extends Controller
     public function __construct(CommentRepo $commentRepo)
     {
         $this->commentRepo = $commentRepo;
-        parent::__construct();
     }
 
     /**
index 3ac1392496ad0630fa550cf9a608b6d596229f52..758c85dda4772b094a1abd50947cebc2d3e20238 100644 (file)
@@ -16,11 +16,6 @@ abstract class Controller extends BaseController
 {
     use DispatchesJobs, ValidatesRequests;
 
-    public function __construct()
-    {
-        //
-    }
-
     /**
      * Check if the current user is signed in.
      */
index 29b1e9027ea128ff9189cc086e97a336c5381441..462ab68f6f32f66ee44ef4439d2448ff62e2c12e 100644 (file)
@@ -15,7 +15,6 @@ class DrawioImageController extends Controller
     public function __construct(ImageRepo $imageRepo)
     {
         $this->imageRepo = $imageRepo;
-        parent::__construct();
     }
 
     /**
index 61907c0039bc7f72d8ec7cdd34804cf5f33536b1..c3ad0b7b261fe6d5946de46eacf5f263715e7470 100644 (file)
@@ -18,7 +18,6 @@ class GalleryImageController extends Controller
     public function __construct(ImageRepo $imageRepo)
     {
         $this->imageRepo = $imageRepo;
-        parent::__construct();
     }
 
     /**
index 52cc463c8543753803b556057af1db7caab280da..ecc36bf67e24ad531f83326ed32d22bf4f97f63d 100644 (file)
@@ -1,14 +1,11 @@
 <?php namespace BookStack\Http\Controllers\Images;
 
-use BookStack\Entities\Page;
 use BookStack\Exceptions\ImageUploadException;
 use BookStack\Http\Controllers\Controller;
-use BookStack\Entities\Repos\PageRepo;
 use BookStack\Uploads\Image;
 use BookStack\Uploads\ImageRepo;
 use Exception;
 use Illuminate\Filesystem\Filesystem as File;
-use Illuminate\Http\JsonResponse;
 use Illuminate\Http\Request;
 use Illuminate\Validation\ValidationException;
 
@@ -26,7 +23,6 @@ class ImageController extends Controller
         $this->image = $image;
         $this->file = $file;
         $this->imageRepo = $imageRepo;
-        parent::__construct();
     }
 
     /**
index 862ba3d7ffe3822169cd9b51ad6b060945f6db80..4d79a5e2f74cf0002f46fbc51e9677303bc1fd5d 100644 (file)
@@ -1,7 +1,5 @@
 <?php namespace BookStack\Http\Controllers;
 
-use Activity;
-use BookStack\Actions\ActivityType;
 use BookStack\Entities\Managers\BookContents;
 use BookStack\Entities\Managers\PageContent;
 use BookStack\Entities\Managers\PageEditActivity;
@@ -27,7 +25,6 @@ class PageController extends Controller
     public function __construct(PageRepo $pageRepo)
     {
         $this->pageRepo = $pageRepo;
-        parent::__construct();
     }
 
     /**
index 3b02ea224716c4f01bc1ceffdd043d5e88702ba4..97ce6ea8529f2be4fb8ae49c631d58434ef43f67 100644 (file)
@@ -16,14 +16,11 @@ class PageExportController extends Controller
 
     /**
      * PageExportController constructor.
-     * @param PageRepo $pageRepo
-     * @param ExportService $exportService
      */
     public function __construct(PageRepo $pageRepo, ExportService $exportService)
     {
         $this->pageRepo = $pageRepo;
         $this->exportService = $exportService;
-        parent::__construct();
     }
 
     /**
index b56235d5b70d566d1928b0f8cf977945b8af56a1..7163e3d5eec3952863a9c6d1248f8e32cbf810d6 100644 (file)
@@ -1,10 +1,8 @@
 <?php namespace BookStack\Http\Controllers;
 
-use BookStack\Actions\ActivityType;
 use BookStack\Entities\Managers\PageContent;
 use BookStack\Entities\Repos\PageRepo;
 use BookStack\Exceptions\NotFoundException;
-use BookStack\Facades\Activity;
 use GatherContent\Htmldiff\Htmldiff;
 
 class PageRevisionController extends Controller
@@ -18,7 +16,6 @@ class PageRevisionController extends Controller
     public function __construct(PageRepo $pageRepo)
     {
         $this->pageRepo = $pageRepo;
-        parent::__construct();
     }
 
     /**
index eaa1a8ae26ae18f28473c6796062dfb5065dba97..2307bc0d52c09b5bd6ee1411f795ac83c11f8e0a 100644 (file)
@@ -16,7 +16,6 @@ class PageTemplateController extends Controller
     public function __construct(PageRepo $pageRepo)
     {
         $this->pageRepo = $pageRepo;
-        parent::__construct();
     }
 
     /**
index 22c1a0f7ed7f2ebfd92f47e5fed931add5c78509..1a02caba0ab62a143f1b082ead57abd778e4e28c 100644 (file)
@@ -20,7 +20,6 @@ class RecycleBinController extends Controller
             $this->checkPermission('restrictions-manage-all');
             return $next($request);
         });
-        parent::__construct();
     }
 
 
index 6e3d5afdc358c7202b1d46c7bcda25b86c1d6877..e16a724a48c49fa419506a997ace27310af607b1 100644 (file)
@@ -17,7 +17,6 @@ class RoleController extends Controller
     public function __construct(PermissionsRepo $permissionsRepo)
     {
         $this->permissionsRepo = $permissionsRepo;
-        parent::__construct();
     }
 
     /**
index 8105843b576acb9072651c878190a5489968f7b4..4bc466e163307d8d6b309205ea829c5d0853dd08 100644 (file)
@@ -26,7 +26,6 @@ class SearchController extends Controller
         $this->viewService = $viewService;
         $this->searchService = $searchService;
         $this->entityContextManager = $entityContextManager;
-        parent::__construct();
     }
 
     /**
index 92435f924ffe47a85c28a5a54b7d4427f2336eeb..f02f541bc9ba5b1a9ad14270d900ae053b23900d 100644 (file)
@@ -15,7 +15,6 @@ class SettingController extends Controller
     public function __construct(ImageRepo $imageRepo)
     {
         $this->imageRepo = $imageRepo;
-        parent::__construct();
     }
 
     /**
index 8c6d6748fa5b79d41090e56f8fd1b1c73dab57c4..ce84bf4101e4c23f6437915a35c3d014a7c306a5 100644 (file)
@@ -14,7 +14,6 @@ class TagController extends Controller
     public function __construct(TagRepo $tagRepo)
     {
         $this->tagRepo = $tagRepo;
-        parent::__construct();
     }
 
     /**
index b1b7e5c4451fe362736267b2bd21a123f9a2964c..1713565fcdf8685770725bd23bfec3f199f4bd75 100644 (file)
@@ -27,7 +27,6 @@ class UserController extends Controller
         $this->userRepo = $userRepo;
         $this->inviteService = $inviteService;
         $this->imageRepo = $imageRepo;
-        parent::__construct();
     }
 
     /**