File tree 1 file changed +6
-14
lines changed
1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -12,32 +12,25 @@ trait TracksActionStates
12
12
/**
13
13
* Initialize the state for the given action.
14
14
*
15
- * @param mixed $action
16
15
* @return void
17
16
*/
18
- public function initializeActionState ($ action )
17
+ public function initializeActionState (Action $ action )
19
18
{
20
19
21
- if ($ action instanceof Action) {
22
- $ action ->setState (ActionState::PENDING );
23
- }
20
+ $ action ->setState (ActionState::PENDING );
21
+
24
22
}
25
23
26
24
/**
27
25
* Update the state of the given action.
28
26
*
29
- * @param mixed $action
30
- * @param string $state
31
27
* @param \Exception|null $exception
32
28
* @return void
33
29
*/
34
- public function updateActionState ($ action , $ state , $ exception = null )
30
+ public function updateActionState (Action $ action , ActionState $ state , $ exception = null )
35
31
{
36
-
37
- if ($ action instanceof Action) {
38
- $ action ->setState ($ state );
39
- $ action ->setException ($ exception );
40
- }
32
+ $ action ->setState ($ state );
33
+ $ action ->setException ($ exception );
41
34
}
42
35
43
36
public function passes (): bool
@@ -57,7 +50,6 @@ public function passes(): bool
57
50
) {
58
51
return false ;
59
52
}
60
-
61
53
}
62
54
63
55
return true ;
You can’t perform that action at this time.
0 commit comments