Skip to content

Commit

Permalink
Update method order.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemorton committed Apr 30, 2012
1 parent 0492fec commit 035b489
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions classes/Gignite/StateMachine/StateMachine.php
Expand Up @@ -33,22 +33,17 @@ protected function state($state)
throw new UnknownStateException;
}

public function current()
{
return $this->state($this->state);
}

public function log()
{
return $this->log;
}

protected function valid_transition($current_state, $new_state)
{
return $current_state->can_change_to($new_state)
OR $new_state->can_change_from($current_state);
}

public function current()
{
return $this->state($this->state);
}

public function update($new_state)
{
$new_state = $this->state($new_state);
Expand Down Expand Up @@ -79,4 +74,9 @@ public function assertNot($state)
}
}

public function log()
{
return $this->log;
}

}

0 comments on commit 035b489

Please sign in to comment.