Skip to content

Commit b292909

Browse files
Laravel 10.x Shift (alexjustesen#576)
Co-authored-by: Shift <[email protected]>
1 parent a26c97e commit b292909

File tree

75 files changed

+1378
-958
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1378
-958
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
.env
99
.env.backup
10-
.phpunit.result.cache
10+
/.phpunit.cache
1111
Homestead.json
1212
Homestead.yaml
1313
auth.json

.phpstorm.meta.php

Lines changed: 66 additions & 33 deletions
Large diffs are not rendered by default.

.phpunit.result.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":1,"defects":[],"times":{"Tests\\Unit\\ExampleTest::test_that_true_is_true":0.001,"Tests\\Feature\\ExampleTest::test_the_application_returns_a_successful_response":0.125}}

_ide_helper.php

Lines changed: 589 additions & 133 deletions
Large diffs are not rendered by default.

app/Console/Commands/InstallCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ class InstallCommand extends Command
2323

2424
/**
2525
* Execute the console command.
26-
*
27-
* @return int
2826
*/
29-
public function handle()
27+
public function handle(): int
3028
{
3129
if (! $this->option('force')) {
3230
$this->newLine(2);

app/Console/Commands/RunSpeedtest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ class RunSpeedtest extends Command
2424

2525
/**
2626
* Execute the console command.
27-
*
28-
* @return int
2927
*/
30-
public function handle()
28+
public function handle(): int
3129
{
3230
$speedtest = [];
3331

app/Console/Commands/TestInfluxDB.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,15 @@ class TestInfluxDB extends Command
2424

2525
/**
2626
* Execute the console command.
27-
*
28-
* @return int
2927
*/
30-
public function handle(InfluxDbSettings $settings)
28+
public function handle(InfluxDbSettings $settings): int
3129
{
3230
$influxdb = [
3331
'enabled' => $settings->v2_enabled,
34-
'url' => optional($settings)->v2_url,
35-
'org' => optional($settings)->v2_org,
36-
'bucket' => optional($settings)->v2_bucket,
37-
'token' => optional($settings)->v2_token,
32+
'url' => $settings?->v2_url,
33+
'org' => $settings?->v2_org,
34+
'bucket' => $settings?->v2_bucket,
35+
'token' => $settings?->v2_token,
3836
];
3937

4038
if ($influxdb['enabled'] == true) {

app/Console/Kernel.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ class Kernel extends ConsoleKernel
1010
{
1111
/**
1212
* Define the application's command schedule.
13-
*
14-
* @return void
1513
*/
16-
protected function schedule(Schedule $schedule)
14+
protected function schedule(Schedule $schedule): void
1715
{
1816
$schedule->job(new SearchForSpeedtests())->everyMinute();
1917

@@ -24,10 +22,8 @@ protected function schedule(Schedule $schedule)
2422

2523
/**
2624
* Register the commands for the application.
27-
*
28-
* @return void
2925
*/
30-
protected function commands()
26+
protected function commands(): void
3127
{
3228
$this->load(__DIR__.'/Commands');
3329

app/Exceptions/Handler.php

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,7 @@
88
class Handler extends ExceptionHandler
99
{
1010
/**
11-
* A list of exception types with their corresponding custom log levels.
12-
*
13-
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
14-
*/
15-
protected $levels = [
16-
//
17-
];
18-
19-
/**
20-
* A list of the exception types that are not reported.
21-
*
22-
* @var array<int, class-string<\Throwable>>
23-
*/
24-
protected $dontReport = [
25-
//
26-
];
27-
28-
/**
29-
* A list of the inputs that are never flashed to the session on validation exceptions.
11+
* The list of the inputs that are never flashed to the session on validation exceptions.
3012
*
3113
* @var array<int, string>
3214
*/
@@ -38,10 +20,8 @@ class Handler extends ExceptionHandler
3820

3921
/**
4022
* Register the exception handling callbacks for the application.
41-
*
42-
* @return void
4323
*/
44-
public function register()
24+
public function register(): void
4525
{
4626
$this->reportable(function (Throwable $e) {
4727
//

app/Filament/Pages/Settings/GeneralPage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace App\Filament\Pages\Settings;
44

5-
use App\Rules\ValidCronExpression;
5+
use App\Rules\Cron;
66
use App\Settings\GeneralSettings;
77
use Filament\Forms\Components\Grid;
88
use Filament\Forms\Components\Section;
@@ -75,7 +75,7 @@ protected function getFormSchema(): array
7575
Section::make('Speedtest Settings')
7676
->schema([
7777
TextInput::make('speedtest_schedule')
78-
->rules([new ValidCronExpression()])
78+
->rules([new Cron()])
7979
->helperText('Leave empty to disable the schedule. You can also use the cron expression generator [HERE](https://crontab.cronhub.io/) to help you make schedules.')
8080
->nullable()
8181
->columnSpan(1),

0 commit comments

Comments
 (0)