mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-02 23:40:04 +00:00
Applied changes from styleci
This commit is contained in:
parent
c2339ac9db
commit
a9b3df537f
7 changed files with 9 additions and 6 deletions
app
Entities/Tools
Http
Uploads
tests/Entity
|
@ -43,7 +43,9 @@ class PageEditActivity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get any editor clash warning messages to show for the given draft revision.
|
* Get any editor clash warning messages to show for the given draft revision.
|
||||||
|
*
|
||||||
* @param PageRevision|Page $draft
|
* @param PageRevision|Page $draft
|
||||||
|
*
|
||||||
* @return string[]
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
public function getWarningMessagesForDraft($draft): array
|
public function getWarningMessagesForDraft($draft): array
|
||||||
|
|
|
@ -4,7 +4,6 @@ namespace BookStack\Http\Controllers;
|
||||||
|
|
||||||
use BookStack\Actions\View;
|
use BookStack\Actions\View;
|
||||||
use BookStack\Entities\Models\Page;
|
use BookStack\Entities\Models\Page;
|
||||||
use BookStack\Entities\Models\PageRevision;
|
|
||||||
use BookStack\Entities\Repos\PageRepo;
|
use BookStack\Entities\Repos\PageRepo;
|
||||||
use BookStack\Entities\Tools\BookContents;
|
use BookStack\Entities\Tools\BookContents;
|
||||||
use BookStack\Entities\Tools\NextPreviousContentLocator;
|
use BookStack\Entities\Tools\NextPreviousContentLocator;
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
namespace BookStack\Http;
|
namespace BookStack\Http;
|
||||||
|
|
||||||
use BookStack\Http\Middleware\PreventAuthenticatedResponseCaching;
|
|
||||||
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||||
|
|
||||||
class Kernel extends HttpKernel
|
class Kernel extends HttpKernel
|
||||||
|
|
|
@ -10,8 +10,9 @@ class PreventAuthenticatedResponseCaching
|
||||||
/**
|
/**
|
||||||
* Handle an incoming request.
|
* Handle an incoming request.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \Closure $next
|
* @param \Closure $next
|
||||||
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
|
|
|
@ -75,6 +75,7 @@ class AttachmentService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store a new attachment upon user upload.
|
* Store a new attachment upon user upload.
|
||||||
|
*
|
||||||
* @throws FileUploadException
|
* @throws FileUploadException
|
||||||
*/
|
*/
|
||||||
public function saveNewUpload(UploadedFile $uploadedFile, int $page_id): Attachment
|
public function saveNewUpload(UploadedFile $uploadedFile, int $page_id): Attachment
|
||||||
|
@ -174,6 +175,7 @@ class AttachmentService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a File from the database and storage.
|
* Delete a File from the database and storage.
|
||||||
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function deleteFile(Attachment $attachment)
|
public function deleteFile(Attachment $attachment)
|
||||||
|
@ -205,6 +207,7 @@ class AttachmentService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store a file in storage with the given filename.
|
* Store a file in storage with the given filename.
|
||||||
|
*
|
||||||
* @throws FileUploadException
|
* @throws FileUploadException
|
||||||
*/
|
*/
|
||||||
protected function putFileInStorage(UploadedFile $uploadedFile): string
|
protected function putFileInStorage(UploadedFile $uploadedFile): string
|
||||||
|
|
|
@ -308,6 +308,7 @@ class ImageService
|
||||||
public function getImageData(Image $image): string
|
public function getImageData(Image $image): string
|
||||||
{
|
{
|
||||||
$storage = $this->getStorage();
|
$storage = $this->getStorage();
|
||||||
|
|
||||||
return $storage->get($this->adjustPathForStorageDisk($image->path, $image->type));
|
return $storage->get($this->adjustPathForStorageDisk($image->path, $image->type));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -138,8 +138,6 @@ class PageDraftTest extends TestCase
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function test_draft_pages_show_on_homepage()
|
public function test_draft_pages_show_on_homepage()
|
||||||
{
|
{
|
||||||
/** @var Book $book */
|
/** @var Book $book */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue