public function apply() { while ($change = array_shift($this->changes)) { if ($change->canApply()) { $change->apply(); } } }