@@ -22,14 +22,14 @@ class FakeDispatcher extends ActualDispatcher implements Fake
22
22
/**
23
23
* List of actions to fake
24
24
*
25
- * @var array<class-string<Actionable>|(Closure(Actionable $action ): bool)>
25
+ * @var array<class-string<Actionable>|(Closure(Actionable): bool)>
26
26
*/
27
27
protected array $ actionsToFake = [];
28
28
29
29
/**
30
30
* List of actions to dispatch
31
31
*
32
- * @var array<class-string<Actionable>|(Closure(Actionable $action ): bool)>
32
+ * @var array<class-string<Actionable>|(Closure(Actionable): bool)>
33
33
*/
34
34
protected array $ actionsToDispatch = [];
35
35
@@ -49,7 +49,7 @@ class FakeDispatcher extends ActualDispatcher implements Fake
49
49
* @param class-string<Actionable>|array<class-string<Actionable>|(Closure(Actionable $action): bool)>|(Closure(Actionable $action): bool) $actionsToFake
50
50
*/
51
51
public function __construct (
52
- array |string | Closure $ actionsToFake ,
52
+ array |Closure | string $ actionsToFake ,
53
53
Container $ container ,
54
54
EventDispatcher $ events ,
55
55
DatabaseManager $ db ,
@@ -63,7 +63,7 @@ public function __construct(
63
63
*
64
64
* @param class-string<Actionable>|array<class-string<Actionable>|(Closure(Actionable $action): bool)>|(Closure(Actionable $action): bool) $actionsToFake
65
65
*/
66
- public function addFake (array |string | Closure $ actionsToFake ): static
66
+ public function addFake (array |Closure | string $ actionsToFake ): static
67
67
{
68
68
return $ this ->with ($ actionsToFake );
69
69
}
@@ -73,7 +73,7 @@ public function addFake(array|string|Closure $actionsToFake): static
73
73
*
74
74
* @param class-string<Actionable>|array<class-string<Actionable>|(Closure(Actionable $action): bool)>|(Closure(Actionable $action): bool) $actionsToFake
75
75
*/
76
- public function with (array |string | Closure $ actionsToFake ): static
76
+ public function with (array |Closure | string $ actionsToFake ): static
77
77
{
78
78
$ this ->actionsToFake = array_merge ($ this ->actionsToFake , Arr::wrap ($ actionsToFake ));
79
79
@@ -85,7 +85,7 @@ public function with(array|string|Closure $actionsToFake): static
85
85
*
86
86
* @param class-string<Actionable>|array<class-string<Actionable>|(Closure(Actionable $action): bool)>|(Closure(Actionable $action): bool) $actionsToDispatch
87
87
*/
88
- public function removeFake (array |string | Closure $ actionsToDispatch ): static
88
+ public function removeFake (array |Closure | string $ actionsToDispatch ): static
89
89
{
90
90
return $ this ->except ($ actionsToDispatch );
91
91
}
@@ -95,7 +95,7 @@ public function removeFake(array|string|Closure $actionsToDispatch): static
95
95
*
96
96
* @param class-string<Actionable>|array<class-string<Actionable>|(Closure(Actionable $action): bool)>|(Closure(Actionable $action): bool) $actionsToDispatch
97
97
*/
98
- public function except (array |string | Closure $ actionsToDispatch ): static
98
+ public function except (array |Closure | string $ actionsToDispatch ): static
99
99
{
100
100
$ this ->actionsToDispatch = array_merge ($ this ->actionsToDispatch , Arr::wrap ($ actionsToDispatch ));
101
101
@@ -185,7 +185,7 @@ protected function shouldDispatchCommand(Actionable $action): bool
185
185
/**
186
186
* Assert if a job was dispatched based on a truth-test callback.
187
187
*/
188
- public function assertDispatched (string | Closure $ command , Closure |int |null $ callback = null ): static
188
+ public function assertDispatched (Closure | string $ command , Closure |int |null $ callback = null ): static
189
189
{
190
190
if ($ command instanceof Closure) {
191
191
[$ command , $ callback ] = [$ this ->firstClosureParameterType ($ command ), $ command ];
@@ -208,7 +208,7 @@ public function assertDispatched(string|Closure $command, Closure|int|null $call
208
208
/**
209
209
* Assert if a job was pushed a number of times.
210
210
*/
211
- public function assertDispatchedTimes (string | Closure $ command , int $ times = 1 ): static
211
+ public function assertDispatchedTimes (Closure | string $ command , int $ times = 1 ): static
212
212
{
213
213
$ callback = null ;
214
214
@@ -232,7 +232,7 @@ public function assertDispatchedTimes(string|Closure $command, int $times = 1):
232
232
/**
233
233
* Determine if a job was dispatched based on a truth-test callback.
234
234
*/
235
- public function assertNotDispatched (string | Closure $ command , Closure $ callback = null ): static
235
+ public function assertNotDispatched (Closure | string $ command , ? Closure $ callback = null ): static
236
236
{
237
237
if ($ command instanceof Closure) {
238
238
[$ command , $ callback ] = [$ this ->firstClosureParameterType ($ command ), $ command ];
0 commit comments