Skip to content

Commit 7ca293b

Browse files
Cannot assign string to property DragonCode\LaravelActions\Values\Options::$step of type ?int
1 parent c89fc05 commit 7ca293b

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/Values/Options.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use DragonCode\LaravelActions\Helpers\Config;
88
use DragonCode\SimpleDataTransferObject\DataTransferObject;
9+
use DragonCode\Support\Facades\Helpers\Boolean;
910
use DragonCode\Support\Facades\Helpers\Str;
1011
use Illuminate\Container\Container;
1112

@@ -49,6 +50,26 @@ protected function castName(?string $value): ?string
4950
->toString();
5051
}
5152

53+
protected function castBefore(mixed $value): bool
54+
{
55+
return Boolean::parse($value);
56+
}
57+
58+
protected function castForce(mixed $value): bool
59+
{
60+
return Boolean::parse($value);
61+
}
62+
63+
protected function castRealpath(mixed $value): bool
64+
{
65+
return Boolean::parse($value);
66+
}
67+
68+
protected function castStep(string|int|null $value): ?int
69+
{
70+
return is_numeric($value) ? (int) $value : null;
71+
}
72+
5273
protected function config(): Config
5374
{
5475
return Container::getInstance()->make(Config::class);

0 commit comments

Comments
 (0)