public function dump(StateMachineEntity
$stateMachine, array
$options =
[]): string
{ $places =
$this->
findStates($stateMachine);
$edges =
$this->
findEdges($stateMachine);
$options =
array_replace_recursive(self::
$defaultOptions,
$options);
return $this->
startDot($options) .
$this->
addStates($places) .
$this->
addEdges($edges) .
$this->
endDot();
} /**
* @return array<string, array<string, array<string, string>>>
*/
private function findStates(StateMachineEntity
$stateMachine): array
{ $states =
[];
$stateMachineStates =
$stateMachine->
getStates();