mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-22 20:02:30 +00:00
PHPStan and StyleCI fixes
- Updated PhpStan PHP version option to match project. - Applied StyleCI changes. - Updated static to self in WebhookFormatter, following static analysis guidance. - Fixed mis-matched header tags.
This commit is contained in:
parent
038015f852
commit
078e8e7dc3
6 changed files with 8 additions and 8 deletions
|
@ -116,7 +116,7 @@ class WebhookFormatter
|
||||||
|
|
||||||
public static function getDefault(string $event, Webhook $webhook, $detail, User $initiator, int $initiatedTime): self
|
public static function getDefault(string $event, Webhook $webhook, $detail, User $initiator, int $initiatedTime): self
|
||||||
{
|
{
|
||||||
$instance = new static($event, $webhook, $detail, $initiator, $initiatedTime);
|
$instance = new self($event, $webhook, $detail, $initiator, $initiatedTime);
|
||||||
$instance->addDefaultModelFormatters();
|
$instance->addDefaultModelFormatters();
|
||||||
|
|
||||||
return $instance;
|
return $instance;
|
||||||
|
|
|
@ -67,7 +67,7 @@ class SettingController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clear logo image if requested
|
// Clear logo image if requested
|
||||||
if ($category === 'customization' && $request->get('app_logo_reset', null)) {
|
if ($category === 'customization' && $request->get('app_logo_reset', null)) {
|
||||||
$this->imageRepo->destroyByType('system');
|
$this->imageRepo->destroyByType('system');
|
||||||
setting()->remove('app-logo');
|
setting()->remove('app-logo');
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ parameters:
|
||||||
# The level 8 is the highest level
|
# The level 8 is the highest level
|
||||||
level: 1
|
level: 1
|
||||||
|
|
||||||
phpVersion: 70300
|
phpVersion: 70400
|
||||||
|
|
||||||
bootstrapFiles:
|
bootstrapFiles:
|
||||||
- bootstrap/phpstan.php
|
- bootstrap/phpstan.php
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('settings.layout')
|
@extends('settings.layout')
|
||||||
|
|
||||||
@section('card')
|
@section('card')
|
||||||
<h1 id="customization" class="list-heading">{{ trans('settings.app_customization') }}</h2>
|
<h1 id="customization" class="list-heading">{{ trans('settings.app_customization') }}</h1>
|
||||||
<form action="{{ url("/settings/customization") }}" method="POST" enctype="multipart/form-data">
|
<form action="{{ url("/settings/customization") }}" method="POST" enctype="multipart/form-data">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
<input type="hidden" name="section" value="customization">
|
<input type="hidden" name="section" value="customization">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@extends('settings.layout')
|
@extends('settings.layout')
|
||||||
|
|
||||||
@section('card')
|
@section('card')
|
||||||
<h1 id="registration" class="list-heading">{{ trans('settings.reg_settings') }}</h2>
|
<h1 id="registration" class="list-heading">{{ trans('settings.reg_settings') }}</h1>
|
||||||
<form action="{{ url("/settings/registration") }}" method="POST">
|
<form action="{{ url("/settings/registration") }}" method="POST">
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
<input type="hidden" name="section" value="registration">
|
<input type="hidden" name="section" value="registration">
|
||||||
|
|
|
@ -17,9 +17,9 @@ class SettingsTest extends TestCase
|
||||||
{
|
{
|
||||||
$this->asAdmin();
|
$this->asAdmin();
|
||||||
$categories = [
|
$categories = [
|
||||||
'features' => 'Features & Security',
|
'features' => 'Features & Security',
|
||||||
'customization' => 'Customization',
|
'customization' => 'Customization',
|
||||||
'registration' => 'Registration',
|
'registration' => 'Registration',
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($categories as $category => $title) {
|
foreach ($categories as $category => $title) {
|
||||||
|
@ -36,4 +36,4 @@ class SettingsTest extends TestCase
|
||||||
$resp->assertStatus(404);
|
$resp->assertStatus(404);
|
||||||
$resp->assertSee('Page Not Found');
|
$resp->assertSee('Page Not Found');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue