Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit e13cfd5

Browse files
committed
Pint formatting
1 parent 1e69a9e commit e13cfd5

34 files changed

+188
-133
lines changed

src/Components/Choice/Checkbox.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class Checkbox extends BladeComponent
1414
public string $type = 'checkbox';
1515

1616
public function __construct(
17-
public null | string $name = null,
18-
public null | string $id = null,
17+
public ?string $name = null,
18+
public ?string $id = null,
1919
public mixed $value = null,
20-
public null | string $label = null,
21-
public null | string $description = '',
20+
public ?string $label = null,
21+
public ?string $description = '',
2222
public bool $checked = false,
2323
public $extraAttributes = '',
2424
) {

src/Components/Choice/CheckboxGroup.php

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

77
class CheckboxGroup extends BladeComponent
88
{
9-
public function __construct(public bool $stacked = true, public int | string $gridCols = 3)
9+
public function __construct(public bool $stacked = true, public int|string $gridCols = 3)
1010
{
1111
}
1212
}

src/Components/Choice/SwitchToggle.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@ class SwitchToggle extends BladeComponent
2020
private string $labelId;
2121

2222
public function __construct(
23-
public null | string $name = null,
24-
public null | string $id = null,
23+
public ?string $name = null,
24+
public ?string $id = null,
2525
public mixed $value = false,
2626
public mixed $onValue = true,
2727
public mixed $offValue = false,
28-
public null | string $containerClass = null,
28+
public ?string $containerClass = null,
2929
public bool $short = false,
30-
public null | string $label = null,
30+
public ?string $label = null,
3131
public string $labelPosition = 'right',
32-
public null | string $offIcon = null, // doesn't apply to short mode
33-
public null | string $onIcon = null, // doesn't apply to short mode
34-
public null | string $buttonLabel = 'form-components::messages.switch_button_label',
35-
public null | string $size = null,
32+
public ?string $offIcon = null, // doesn't apply to short mode
33+
public ?string $onIcon = null, // doesn't apply to short mode
34+
public ?string $buttonLabel = 'form-components::messages.switch_button_label',
35+
public ?string $size = null,
3636
public bool $disabled = false,
3737
public $extraAttributes = '',
3838
) {

src/Components/Files/FilePond.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ class FilePond extends BladeComponent
1818
public function __construct(
1919
public bool $multiple = false,
2020
public bool $allowDrop = true,
21-
public null | string $name = null,
21+
public ?string $name = null,
2222
public array $options = [],
2323
public bool $disabled = false,
24-
public null | int $maxFiles = null,
25-
null|string $type = null,
26-
public null | string $description = null,
24+
public ?int $maxFiles = null,
25+
?string $type = null,
26+
public ?string $description = null,
2727
/*
2828
* When set to true, the component will watch for changes to the wire:model
2929
* and manually remove the files from the FilePond instance if they are

src/Components/Files/FileUpload.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@ class FileUpload extends BladeComponent
1717

1818
protected static array $assets = ['alpine'];
1919

20-
protected null|bool $canShowUploadProgress = null;
21-
public null|string $label;
20+
protected ?bool $canShowUploadProgress = null;
21+
22+
public ?string $label;
2223

2324
public function __construct(
24-
public null | string $name = null,
25-
public null | string $id = null,
26-
null|string $label = 'form-components::messages.file_upload_label',
25+
public ?string $name = null,
26+
public ?string $id = null,
27+
?string $label = 'form-components::messages.file_upload_label',
2728
public bool $multiple = false,
28-
null|string $type = null,
29+
?string $type = null,
2930
// Display the file upload progress if using livewire.
3031
// Only applies if a "wire:model" attribute is set.
3132
public bool $displayUploadProgress = true,
@@ -39,7 +40,7 @@ public function __construct(
3940
$this->label = __($label);
4041
}
4142

42-
public function canShowUploadProgress($attributes): bool
43+
public function canShowUploadProgress(): bool
4344
{
4445
if (! is_null($this->canShowUploadProgress)) {
4546
return $this->canShowUploadProgress;

src/Components/FormError.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
class FormError extends BladeComponent
88
{
99
public function __construct(
10-
public null | string $name = null,
11-
public null | string $inputId = null,
10+
public ?string $name = null,
11+
public ?string $inputId = null,
1212
public string $bag = 'default',
1313
public string $tag = 'p',
1414
) {

src/Components/FormGroup.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ class FormGroup extends BladeComponent
1111

1212
public function __construct(
1313
public string $name = '',
14-
public null | string | bool $label = null,
15-
public null | string $inputId = null,
14+
public null|string|bool $label = null,
15+
public ?string $inputId = null,
1616
public bool $inline = false,
1717
bool $showErrors = true,
18-
public null | string $helpText = null,
18+
public ?string $helpText = null,
1919
public bool $border = true,
2020
public bool $isCheckboxGroup = false,
21-
public null | string $labelId = null,
21+
public ?string $labelId = null,
2222
public bool $marginBottom = true,
23-
public null | string $hint = null,
23+
public ?string $hint = null,
2424
public bool $optional = false,
2525
public bool $customSelectLabel = false,
2626
) {

src/Components/Inputs/DatePicker.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ class DatePicker extends Input
88
{
99
protected static array $assets = ['alpine', 'flatpickr'];
1010

11-
public null|string $placeholder;
11+
public ?string $placeholder;
1212

1313
public function __construct(
14-
public null | string $name = null,
15-
public null | string $id = null,
14+
public ?string $name = null,
15+
public ?string $id = null,
1616
public mixed $value = null,
17-
public null | string $maxWidth = null,
17+
public ?string $maxWidth = null,
1818
bool $showErrors = true,
1919
$leadingAddon = false,
2020
$inlineAddon = false,
@@ -27,12 +27,12 @@ public function __construct(
2727
public bool $clickOpens = false,
2828
public bool $allowInput = true,
2929
public bool $enableTime = false,
30-
public bool | null | string $format = false,
30+
public bool|null|string $format = false,
3131
public bool $clearable = false,
32-
null|string $placeholder = 'form-components::messages.date_picker_placeholder',
33-
public bool | null | string $toggleIcon = null,
34-
public null | string $clearIcon = null,
35-
public null | string $containerClass = null,
32+
?string $placeholder = 'form-components::messages.date_picker_placeholder',
33+
public bool|null|string $toggleIcon = null,
34+
public ?string $clearIcon = null,
35+
public ?string $containerClass = null,
3636
public $extraAttributes = '',
3737
public $after = null,
3838
) {

src/Components/Inputs/Input.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ class Input extends BladeComponent
2828
public const DEFAULT_TRAILING_ADDON_PADDING = 'pr-12';
2929

3030
public function __construct(
31-
public null | string $name = null,
32-
public null | string $id = null,
31+
public ?string $name = null,
32+
public ?string $id = null,
3333
public string $type = 'text',
3434
public mixed $value = null,
35-
public null | string $maxWidth = null,
35+
public ?string $maxWidth = null,
3636
bool $showErrors = true,
37-
public null | string $containerClass = null,
37+
public ?string $containerClass = null,
3838
$leadingAddon = false,
3939
$inlineAddon = false,
4040
$inlineAddonPadding = self::DEFAULT_INLINE_ADDON_PADDING,

src/Components/Inputs/Password.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,23 @@
99
class Password extends Input
1010
{
1111
protected static array $assets = ['alpine'];
12+
1213
protected bool $ignoreAddons = true;
1314

1415
public function __construct(
15-
public null | string $name = null,
16-
public null | string $id = null,
16+
public ?string $name = null,
17+
public ?string $id = null,
1718
public mixed $value = null,
18-
public null | string $maxWidth = null,
19+
public ?string $maxWidth = null,
1920
bool $showErrors = true,
2021
$leadingAddon = false,
2122
$inlineAddon = false,
2223
$inlineAddonPadding = self::DEFAULT_INLINE_ADDON_PADDING,
2324
$leadingIcon = false,
2425
public bool $showToggle = true,
25-
public null | string $showPasswordIcon = null,
26-
public null | string $hidePasswordIcon = null,
27-
public null | string $containerClass = null,
26+
public ?string $showPasswordIcon = null,
27+
public ?string $hidePasswordIcon = null,
28+
public ?string $containerClass = null,
2829
public $extraAttributes = '',
2930
public $after = null,
3031
) {

0 commit comments

Comments
 (0)