File tree Expand file tree Collapse file tree 3 files changed +20
-3
lines changed
Expand file tree Collapse file tree 3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 6464 "ci" : [
6565 " ./vendor/bin/pint --test" ,
6666 " ./vendor/bin/phpstan analyse --memory-limit=2G" ,
67- " ./vendor/bin/pest --parallel --coverage --min=90 "
67+ " ./vendor/bin/pest --parallel --coverage --min=85 "
6868 ]
6969 },
7070 "minimum-stability" : " stable" ,
Original file line number Diff line number Diff line change @@ -42,10 +42,12 @@ final class FractionBuilder implements Arrayable
4242
4343 public function __construct (
4444 public Application $ application ,
45- public string $ action ,
45+ public string | UnitEnum $ action ,
4646 public Closure $ closure
4747 ) {
48- // ...
48+ $ this ->action = $ this ->action instanceof UnitEnum
49+ ? $ this ->action ->name
50+ : $ this ->action ;
4951 }
5052
5153 /**
Original file line number Diff line number Diff line change 3232 [1 , 2 , 3 ],
3333]);
3434
35+ test ('can execute using enum ' , function () {
36+ execute (Actions::Testing, function () {
37+ return 1 ;
38+ });
39+
40+ $ test = run (Actions::Testing);
41+
42+ expect ($ test )->toBe (1 );
43+ });
44+
3545test ('resolve laravel dependencies ' , function () {
3646 execute ('testing ' , function (Request $ request ) {
3747 return $ request ->method ();
209219
210220 run ('testing ' );
211221})->throws (PreventDeferQueueSameTime::class, 'The action [testing] cannot use defer and queue at the same time. ' );
222+
223+ enum Actions
224+ {
225+ case Testing;
226+ }
You can’t perform that action at this time.
0 commit comments