We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7640e07 commit 66e1f56Copy full SHA for 66e1f56
packages/adverbs/src/Traits/HasVerbsState.php
@@ -12,10 +12,19 @@ trait HasVerbsState
12
/**
13
* Get the state class for this model.
14
*/
15
- protected function getVerbsState(): string
+ protected function getStateClass(): string
16
{
17
+ throw_if(
18
+ condition: empty($this->state_class),
19
+ exception: 'State class is not set',
20
+ );
21
+
22
$state = $this->state_class;
- throw_if(! class_exists($state), 'Unknown class '.$this->verbs_state);
23
24
25
+ condition: ! class_exists($state),
26
+ exception: 'Unknown class '.$state,
27
28
29
return $state;
30
}
0 commit comments