Skip to content

NOW MANAGED ON CODEBERG

Applied changes from styleci

Dan Browna9b3df537f74
diff --git a/app/Entities/Tools/PageEditActivity.php b/app/Entities/Tools/PageEditActivity.php
index f23506a8c..ef6c085ac 100644
--- a/app/Entities/Tools/PageEditActivity.php
+++ b/app/Entities/Tools/PageEditActivity.php
@@ -43,7 +43,9 @@ class PageEditActivity
/**
* Get any editor clash warning messages to show for the given draft revision.
+ *
* @param PageRevision|Page $draft
+ *
* @return string[]
*/
public function getWarningMessagesForDraft($draft): array
diff --git a/app/Http/Controllers/PageController.php b/app/Http/Controllers/PageController.php
index 9025db162..a94a61803 100644
--- a/app/Http/Controllers/PageController.php
+++ b/app/Http/Controllers/PageController.php
@@ -4,7 +4,6 @@ namespace BookStack\Http\Controllers;
use BookStack\Actions\View;
use BookStack\Entities\Models\Page;
-use BookStack\Entities\Models\PageRevision;
use BookStack\Entities\Repos\PageRepo;
use BookStack\Entities\Tools\BookContents;
use BookStack\Entities\Tools\NextPreviousContentLocator;
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index 8c71e2194..7a09493af 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -2,7 +2,6 @@
namespace BookStack\Http;
-use BookStack\Http\Middleware\PreventAuthenticatedResponseCaching;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
diff --git a/app/Http/Middleware/PreventAuthenticatedResponseCaching.php b/app/Http/Middleware/PreventAuthenticatedResponseCaching.php
index 3ad5b3914..60c913811 100644
--- a/app/Http/Middleware/PreventAuthenticatedResponseCaching.php
+++ b/app/Http/Middleware/PreventAuthenticatedResponseCaching.php
@@ -10,8 +10,9 @@ class PreventAuthenticatedResponseCaching
/**
* Handle an incoming request.
*
- * @param \Illuminate\Http\Request $request
- * @param \Closure $next
+ * @param \Illuminate\Http\Request $request
+ * @param \Closure $next
+ *
* @return mixed
*/
public function handle($request, Closure $next)
diff --git a/app/Uploads/AttachmentService.php b/app/Uploads/AttachmentService.php
index c957e8bea..3de0a0dae 100644
--- a/app/Uploads/AttachmentService.php
+++ b/app/Uploads/AttachmentService.php
@@ -75,6 +75,7 @@ class AttachmentService
/**
* Store a new attachment upon user upload.
+ *
* @throws FileUploadException
*/
public function saveNewUpload(UploadedFile $uploadedFile, int $page_id): Attachment
@@ -174,6 +175,7 @@ class AttachmentService
/**
* Delete a File from the database and storage.
+ *
* @throws Exception
*/
public function deleteFile(Attachment $attachment)
@@ -205,6 +207,7 @@ class AttachmentService
/**
* Store a file in storage with the given filename.
+ *
* @throws FileUploadException
*/
protected function putFileInStorage(UploadedFile $uploadedFile): string
diff --git a/app/Uploads/ImageService.php b/app/Uploads/ImageService.php
index eff8005d7..d6c74c751 100644
--- a/app/Uploads/ImageService.php
+++ b/app/Uploads/ImageService.php
@@ -308,6 +308,7 @@ class ImageService
public function getImageData(Image $image): string
{
$storage = $this->getStorage();
+
return $storage->get($this->adjustPathForStorageDisk($image->path, $image->type));
}
diff --git a/tests/Entity/PageDraftTest.php b/tests/Entity/PageDraftTest.php
index 21a74768f..4fb7d7ab6 100644
--- a/tests/Entity/PageDraftTest.php
+++ b/tests/Entity/PageDraftTest.php
@@ -138,8 +138,6 @@ class PageDraftTest extends TestCase
]);
}
-
-
public function test_draft_pages_show_on_homepage()
{
/** @var Book $book */