From 732a81ca19fa7e50448e922dc349097fab586b92 Mon Sep 17 00:00:00 2001 From: Christopher CHEN Date: Tue, 12 Jul 2016 20:59:51 +0800 Subject: [PATCH] feat: record time in fsm history --- src/StateMachine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StateMachine.php b/src/StateMachine.php index 7e25fd3..5ceb029 100644 --- a/src/StateMachine.php +++ b/src/StateMachine.php @@ -126,7 +126,7 @@ public function initAction(array $history = []) $currentState = end($history); return $this->currentState = $currentState['state']; } - $this->history[] = ['action' => 'init', 'state' => $this->initState]; + $this->history[] = ['time' => time(), 'action' => 'init', 'state' => $this->initState]; return $this->currentState = $this->initState; }