@@ -208,7 +208,7 @@ |
||
| 208 | 208 | } |
| 209 | 209 | |
| 210 | 210 | /** |
| 211 | - * @param string|\Spatie\ModelStates\Transition $transitionClass |
|
| 211 | + * @param string|\Spatie\ModelStates\Transition $transition |
|
| 212 | 212 | * @param mixed ...$args |
| 213 | 213 | * |
| 214 | 214 | * @return \Illuminate\Database\Eloquent\Model |
@@ -2,13 +2,13 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Spatie\ModelStates; |
| 4 | 4 | |
| 5 | -use ReflectionClass; |
|
| 6 | -use JsonSerializable; |
|
| 7 | -use Illuminate\Support\Collection; |
|
| 8 | 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | +use Illuminate\Support\Collection; |
|
| 7 | +use JsonSerializable; |
|
| 8 | +use ReflectionClass; |
|
| 9 | 9 | use Spatie\ModelStates\Events\StateChanged; |
| 10 | -use Spatie\ModelStates\Exceptions\InvalidConfig; |
|
| 11 | 10 | use Spatie\ModelStates\Exceptions\CouldNotPerformTransition; |
| 11 | +use Spatie\ModelStates\Exceptions\InvalidConfig; |
|
| 12 | 12 | |
| 13 | 13 | abstract class State implements JsonSerializable |
| 14 | 14 | { |
@@ -2,11 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Spatie\ModelStates; |
| 4 | 4 | |
| 5 | -use Illuminate\Support\Collection; |
|
| 6 | -use Illuminate\Database\Eloquent\Model; |
|
| 7 | 5 | use Illuminate\Database\Eloquent\Builder; |
| 8 | -use Spatie\ModelStates\Exceptions\InvalidConfig; |
|
| 6 | +use Illuminate\Database\Eloquent\Model; |
|
| 7 | +use Illuminate\Support\Collection; |
|
| 9 | 8 | use Spatie\ModelStates\Exceptions\CouldNotPerformTransition; |
| 9 | +use Spatie\ModelStates\Exceptions\InvalidConfig; |
|
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * @mixin \Illuminate\Database\Eloquent\Model |
@@ -27,6 +27,9 @@ |
||
| 27 | 27 | /** @var \Illuminate\Database\Eloquent\Model */ |
| 28 | 28 | public $model; |
| 29 | 29 | |
| 30 | + /** |
|
| 31 | + * @param State $initialState |
|
| 32 | + */ |
|
| 30 | 33 | public function __construct( |
| 31 | 34 | ?State $initialState, |
| 32 | 35 | ?State $finalState, |
@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Spatie\ModelStates\Events; |
| 4 | 4 | |
| 5 | +use Illuminate\Database\Eloquent\Model; |
|
| 6 | +use Illuminate\Queue\SerializesModels; |
|
| 5 | 7 | use Spatie\ModelStates\State; |
| 6 | 8 | use Spatie\ModelStates\Transition; |
| 7 | -use Illuminate\Queue\SerializesModels; |
|
| 8 | -use Illuminate\Database\Eloquent\Model; |
|
| 9 | 9 | |
| 10 | 10 | class StateChanged |
| 11 | 11 | { |