-
Notifications
You must be signed in to change notification settings - Fork 1
/
WakesUp.php
52 lines (46 loc) · 995 Bytes
/
WakesUp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
namespace Hyn\Statemachine\Stubs\Transitions\Cat;
use Hyn\Statemachine\Contracts\StateContract;
use Hyn\Statemachine\Stubs\States\Cat\Awake;
use Hyn\Statemachine\Transition;
class WakesUp extends Transition
{
/**
* Whether the requirements are met to process through this transition.
*
* @return bool
*/
public function requirementsMet() : bool
{
return true;
}
/**
* Returns the list of suggested states to move into.
*
* @return array
*/
public function suggests() : array
{
return [
Awake::class,
];
}
/**
* Processing the transition.
*
* @return StateContract
*/
public function fire() : StateContract
{
return new Awake($this->model);
}
/**
* In case something went wrong, reset.
*
* @return StateContract|boolean
*/
public function reset()
{
// TODO: Implement reset() method.
}
}