Skip to content

Commit d86c18b

Browse files
pascalbaljetgithub-actions[bot]
authored andcommitted
Fix styling
1 parent 9d9a40b commit d86c18b

28 files changed

+55
-110
lines changed

Diff for: app/app/Models/User.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class User extends Authenticatable implements HasMedia
1414
{
15-
use HasApiTokens, HasFactory, Notifiable, InteractsWithMedia;
15+
use HasApiTokens, HasFactory, InteractsWithMedia, Notifiable;
1616

1717
/**
1818
* The attributes that are mass assignable.
@@ -61,7 +61,7 @@ public function registerMediaCollections(): void
6161
$this->addMediaCollection('photos');
6262
}
6363

64-
public function registerMediaConversions(Media $media = null): void
64+
public function registerMediaConversions(?Media $media = null): void
6565
{
6666
$this->addMediaConversion('thumb')->fit('contain', 50, 50);
6767
}

Diff for: src/AbstractForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function rules(...$arguments): array
7575
*
7676
* @param mixed ...$params
7777
*/
78-
public function validate(Request $request = null, ...$params): array
78+
public function validate(?Request $request = null, ...$params): array
7979
{
8080
/** @var Request */
8181
$request = $request ?? request();

Diff for: src/AbstractTable.php

-9
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ abstract class AbstractTable
1010
{
1111
/**
1212
* The SpladeTable instance.
13-
*
14-
* @var \ProtoneMedia\Splade\SpladeTable|null
1513
*/
1614
private ?SpladeTable $table = null;
1715

@@ -37,8 +35,6 @@ public function for()
3735

3836
/**
3937
* Helper method to create a new SpladeTable instance.
40-
*
41-
* @return \ProtoneMedia\Splade\SpladeTable
4238
*/
4339
public static function build(...$arguments): SpladeTable
4440
{
@@ -50,8 +46,6 @@ public static function build(...$arguments): SpladeTable
5046
/**
5147
* Creates a new SpladeTable instance with the resource or
5248
* query builder from the 'for()' method of this class.
53-
*
54-
* @return \ProtoneMedia\Splade\SpladeTable
5549
*/
5650
public function make(): SpladeTable
5751
{
@@ -71,7 +65,6 @@ function (SpladeTable $table) {
7165
/**
7266
* Configure the given SpladeTable.
7367
*
74-
* @param \ProtoneMedia\Splade\SpladeTable $table
7568
* @return void
7669
*/
7770
public function configure(SpladeTable $table)
@@ -81,8 +74,6 @@ public function configure(SpladeTable $table)
8174

8275
/**
8376
* Returns a TableExporter instance.
84-
*
85-
* @return \ProtoneMedia\Splade\TableExporter|null
8677
*/
8778
public function makeExporter(int $key): ?TableExporter
8879
{

Diff for: src/Components/Form.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
class Form extends Component
2121
{
22-
use ParsesJsonDataAttribute;
2322
use InteractsWithFormElement;
23+
use ParsesJsonDataAttribute;
2424

2525
public string $spladeId;
2626

Diff for: src/Components/Form/Select.php

-2
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ public function options(): array
197197

198198
/**
199199
* Returns the placeholder option when necessary.
200-
*
201-
* @return \ProtoneMedia\Splade\FormSelectOption
202200
*/
203201
public function placeholderOption(): ?FormSelectOption
204202
{

Diff for: src/EventRedirectFactory.php

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public function __construct(
3636
*
3737
* @param string $method
3838
* @param array $parameters
39-
* @return \ProtoneMedia\Splade\EventRedirect
4039
*/
4140
public function __call($method, $parameters): EventRedirect
4241
{

Diff for: src/FileUploads/ExistingFile.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ public static function fromMediaLibraryWithoutPreview($media)
126126

127127
/**
128128
* Returns an instance of ExistingFileFromDisk to load the file from a disk.
129-
*
130-
* @return \ProtoneMedia\Splade\FileUploads\ExistingFileFromDisk
131129
*/
132130
public static function fromDisk(string $disk): ExistingFileFromDisk
133131
{
@@ -137,8 +135,6 @@ public static function fromDisk(string $disk): ExistingFileFromDisk
137135
/**
138136
* Returns an instance of ExistingFileFromDisk to load the file from a disk,
139137
* but without a preview.
140-
*
141-
* @return \ProtoneMedia\Splade\FileUploads\ExistingFileFromDisk
142138
*/
143139
public static function fromDiskWithoutPreview(string $disk): ExistingFileFromDisk
144140
{
@@ -254,7 +250,7 @@ public function getIdentifier(): string
254250
*
255251
* @return string
256252
*/
257-
public function getMetadata(string $key = null)
253+
public function getMetadata(?string $key = null)
258254
{
259255
return $key ? Arr::get($this->metadata, $key) : $this->metadata;
260256
}

Diff for: src/FileUploads/Filesystem.php

-9
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ public function __construct(private string $disk)
2525

2626
/**
2727
* Stores the uploaded file as a temporary file.
28-
*
29-
* @return \ProtoneMedia\Splade\FileUploads\TemporaryFileUpload
3028
*/
3129
public function storeUploadedFileTemporarely(UploadedFile $file): TemporaryFileUpload
3230
{
@@ -68,8 +66,6 @@ public function deleteTemporaryFiles()
6866

6967
/**
7068
* Returns a boolean whether the file exists.
71-
*
72-
* @param \ProtoneMedia\Splade\FileUploads\TemporaryFileUpload $temporaryFileUpload
7369
*/
7470
public function exists(TemporaryFileUpload $temporaryFileUpload): bool
7571
{
@@ -78,9 +74,6 @@ public function exists(TemporaryFileUpload $temporaryFileUpload): bool
7874

7975
/**
8076
* Returns an instance of SpladeUploadedFile when the temporary file exists.
81-
*
82-
* @param \ProtoneMedia\Splade\FileUploads\TemporaryFileUpload $temporaryFileUpload
83-
* @return \ProtoneMedia\Splade\FileUploads\SpladeUploadedFile|null
8477
*/
8578
public function makeUploadedFile(TemporaryFileUpload $temporaryFileUpload): ?SpladeUploadedFile
8679
{
@@ -99,8 +92,6 @@ public function makeUploadedFile(TemporaryFileUpload $temporaryFileUpload): ?Spl
9992

10093
/**
10194
* Deletes the temporary file.
102-
*
103-
* @param \ProtoneMedia\Splade\FileUploads\TemporaryFileUpload $temporaryFileUpload
10495
*/
10596
public function delete(TemporaryFileUpload $temporaryFileUpload): bool
10697
{

Diff for: src/FileUploads/SpladeUploadedFile.php

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ public function isValid(): bool
2121

2222
/**
2323
* Sets the temporary file upload.
24-
*
25-
* @param \ProtoneMedia\Splade\FileUploads\TemporaryFileUpload $temporaryFileUpload
2624
*/
2725
public function setTemporaryFileUpload(TemporaryFileUpload $temporaryFileUpload): self
2826
{

Diff for: src/FormBuilder/Checkboxes.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
class Checkboxes extends Component
1010
{
11-
use HasOptions;
1211
use CanBeInline;
12+
use HasOptions;
1313

1414
/**
1515
* Renders the SpladeCheckboxex

Diff for: src/FormBuilder/Component.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public function attributes(array $attributes): self
180180
/**
181181
* Adds one or more validation rules to an input field
182182
*
183-
* @param mixed ...$rules One or more rules, may be an array of strings or multiple strings
183+
* @param mixed ...$rules One or more rules, may be an array of strings or multiple strings
184184
* @return $this
185185
*/
186186
public function rules(...$rules): self

Diff for: src/FormBuilder/Concerns/HasOptions.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ trait HasOptions
99
/**
1010
* Set an array with options
1111
*
12-
* @param array $options ['value1' => 'Label 1', 'value2' => 'Label 2']
12+
* @param array $options ['value1' => 'Label 1', 'value2' => 'Label 2']
1313
* @return $this
1414
*/
1515
public function options(array $options = []): self

Diff for: src/FormBuilder/Radios.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
class Radios extends Component
1010
{
11-
use HasOptions;
1211
use CanBeInline;
12+
use HasOptions;
1313

1414
/**
1515
* Renders the SpladeRadios

Diff for: src/Http/SpladeMiddleware.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function terminate($request, $response)
125125
*
126126
* @return void
127127
*/
128-
public static function afterOriginalResponse(Closure $callback = null)
128+
public static function afterOriginalResponse(?Closure $callback = null)
129129
{
130130
static::$afterOriginalResponseCallback = $callback;
131131
}

Diff for: src/PasswordValidator.php

+3-7
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ public function recentlyConfirmed(Request $request): bool
4949

5050
/**
5151
* Validate the given user's password using Laravel Fortify.
52-
*
53-
* @param \Illuminate\Contracts\Auth\Authenticatable $user
5452
*/
55-
private function validateWithFortify(Authenticatable $user = null, string $password): bool
53+
private function validateWithFortify(?Authenticatable $user, string $password): bool
5654
{
5755
return app(ConfirmPassword::class)(
5856
app(StatefulGuard::class), $user, $password
@@ -61,10 +59,8 @@ private function validateWithFortify(Authenticatable $user = null, string $passw
6159

6260
/**
6361
* Validate the given user's password using regular Laravel Auth logic.
64-
*
65-
* @param \Illuminate\Contracts\Auth\Authenticatable $user
6662
*/
67-
private function validateWithoutForfify(Authenticatable $user = null, string $password): bool
63+
private function validateWithoutForfify(?Authenticatable $user, string $password): bool
6864
{
6965
$guard = Auth::guard(config('splade.confirm_password_guard'));
7066

@@ -85,7 +81,7 @@ public function validateRequest(Request $request, string $attribute): bool
8581
/**
8682
* Validates the given User and password.
8783
*/
88-
public function validate(Authenticatable $user = null, string $password, string $attribute): bool
84+
public function validate(?Authenticatable $user, string $password, string $attribute): bool
8985
{
9086
if (!$user) {
9187
throw ValidationException::withMessages([

Diff for: src/ServiceProvider.php

-1
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,6 @@ private function registerRequestMacros()
545545
/**
546546
* Adds the default transitions to the repository.
547547
*
548-
* @param \ProtoneMedia\Splade\TransitionRepository $transitionRepository
549548
* @return void
550549
*/
551550
public static function registerTransitionAnimations(TransitionRepository $transitionRepository)

Diff for: src/SpladeCore.php

+1-17
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ public function reset(): self
117117

118118
/**
119119
* Getter for the Head instance.
120-
*
121-
* @return \ProtoneMedia\Splade\Head
122120
*/
123121
public function head(): Head
124122
{
@@ -269,8 +267,6 @@ public function onLazy($value)
269267

270268
/**
271269
* Returns a new EventRefresh instance.
272-
*
273-
* @return \ProtoneMedia\Splade\EventRefresh
274270
*/
275271
public static function refreshOnEvent(): EventRefresh
276272
{
@@ -279,8 +275,6 @@ public static function refreshOnEvent(): EventRefresh
279275

280276
/**
281277
* Returns a new EventRedirectFactory instance.
282-
*
283-
* @return \ProtoneMedia\Splade\EventRedirectFactory
284278
*/
285279
public static function redirectOnEvent(): EventRedirectFactory
286280
{
@@ -289,8 +283,6 @@ public static function redirectOnEvent(): EventRedirectFactory
289283

290284
/**
291285
* Returns a new instance of the ToastBuilder.
292-
*
293-
* @return \ProtoneMedia\Splade\SpladeToastBuilder
294286
*/
295287
public function toastBuilder(): SpladeToastBuilder
296288
{
@@ -299,8 +291,6 @@ public function toastBuilder(): SpladeToastBuilder
299291

300292
/**
301293
* Returns a new SpladeToast instance
302-
*
303-
* @return \ProtoneMedia\Splade\SpladeToast
304294
*/
305295
public static function toastOnEvent(string $message = ''): SpladeToast
306296
{
@@ -320,10 +310,8 @@ public static function toastOnEvent(string $message = ''): SpladeToast
320310
/**
321311
* Returns a Closure that prevents generating a response from
322312
* a ValidationException when this is a Splade request.
323-
*
324-
* @param callable $renderUsing
325313
*/
326-
public static function exceptionHandler(Handler $exceptionHandler, callable $renderUsing = null): Closure
314+
public static function exceptionHandler(Handler $exceptionHandler, ?callable $renderUsing = null): Closure
327315
{
328316
return Closure::bind(function (Throwable $e, $request) use ($renderUsing) {
329317
if ($renderUsing) {
@@ -356,8 +344,6 @@ public static function exceptionHandler(Handler $exceptionHandler, callable $ren
356344
/**
357345
* Returns a new SpladeToast instance, optionally with the given message
358346
* if it isn't empty, and it uses the custom toast factory if set.
359-
*
360-
* @return \ProtoneMedia\Splade\SpladeToast
361347
*/
362348
public function toast(string $message = ''): SpladeToast
363349
{
@@ -392,8 +378,6 @@ public function getDataStores(): array
392378

393379
/**
394380
* Adds a new Data Store.
395-
*
396-
* @param \ProtoneMedia\Splade\DataStore $store
397381
*/
398382
public function addDataStore(DataStore $store): self
399383
{

Diff for: src/SpladeForm.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ public function class(array|string $class): self
9494
*/
9595
public function confirm(
9696
string|bool $confirm = true,
97-
string $text = null,
98-
string $confirmButton = null,
99-
string $cancelButton = null,
97+
?string $text = null,
98+
?string $confirmButton = null,
99+
?string $cancelButton = null,
100100
bool $danger = false,
101101
string|bool $requirePassword = false,
102102
bool $requirePasswordOnce = false
@@ -158,10 +158,10 @@ public function preserveScroll(bool $preserve_scroll = true): self
158158
*/
159159
public function requirePassword(
160160
bool $requirePasswordOnce = false,
161-
string $heading = null,
162-
string $text = null,
163-
string $confirmButton = null,
164-
string $cancelButton = null,
161+
?string $heading = null,
162+
?string $text = null,
163+
?string $confirmButton = null,
164+
?string $cancelButton = null,
165165
bool $danger = false
166166
): self {
167167
return $this->confirm(
@@ -178,7 +178,7 @@ public function requirePassword(
178178
/**
179179
* Prevent navigation on submit.
180180
*
181-
* @param string $actionOnSuccess reset|restore
181+
* @param string $actionOnSuccess reset|restore
182182
* @return $this
183183
*/
184184
public function stay(bool $stay = true, string $actionOnSuccess = ''): self
@@ -201,7 +201,7 @@ public function stay(bool $stay = true, string $actionOnSuccess = ''): self
201201
*/
202202
public function submitOnChange(
203203
bool $enabled = true,
204-
array|string $watchFields = null,
204+
array|string|null $watchFields = null,
205205
bool $background = true,
206206
int $debounce = 500
207207
): self {
@@ -293,7 +293,7 @@ public function getRules(): array
293293
*
294294
* @param [type] ...$params
295295
*/
296-
public function validate(Request $request = null, ...$params): array
296+
public function validate(?Request $request = null, ...$params): array
297297
{
298298
/** @var Request */
299299
$request = $request ?? request();

0 commit comments

Comments
 (0)