We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 679d9ad commit 09c3a0bCopy full SHA for 09c3a0b
1 file changed
src/Machine.php
@@ -117,6 +117,10 @@ public function getMachineState(): StateEnum
117
*/
118
protected function setMachineState(StateEnum $newState)
119
{
120
+ // just return if state doesn't change
121
+ if ($this->machineState->is((string)$newState)) {
122
+ return $this;
123
+ }
124
125
if (false === $this->isTransitionAllowed($newState)) {
126
throw new TransitionException('State transition from ' . (string)$this->getMachineState() . ' to ' . (string)$newState . ' is not allowed.');
0 commit comments