/** * Copy * * Perform deep clone * * @param State[] $visited * * @return Transition */ public function copy(&$visited = []) { return new DefaultTransition($this->label, $this->to->copy($visited), $this->guard, $this->action); }
/** * @inheritDoc */ public function copy(&$visited = []) { return new self($this->argument, $this->to->copy($visited)); }
/** * @inheritDoc */ public function copy(&$visited = []) { return new self($this->optionDefinition, $this->to->copy($visited)); }
/** * @param \Khaos\FSM\State\State $to */ function it_can_be_copied($to) { $visited = []; $to->copy($visited)->willReturn(new DefaultState('State A')); $this->copy()->shouldBeLike(new DefaultTransition('Transition A', new DefaultState('State A'), null, null)); }
/** * @inheritDoc */ public function copy(&$visited = []) { return new self($this->command, $this->to->copy($visited)); }