protected function parseYAML()
    {
        try {
            $yaml                = $this->configuration;
            $yaml_fixed          = [];
            $yaml_fixed['class'] = $yaml['class'];
            foreach ($yaml['states'] as $key => $value) {
                if ($value['type'] != \Mothership\StateMachine\StatusInterface::TYPE_INITIAL && $value['type'] != \Mothership\StateMachine\StatusInterface::TYPE_EXCEPTION) {
                    $state                  = [
                        'name'             => $key,
                        'type'             => $value['type'],
                        'transitions_from' => $value['transitions_from'],
                        'transitions_to'   => $value['transitions_to'],
                    ];
                    $yaml_fixed['states'][] = $state;
                } else {
                    $state                  = [
                        'name' => $key,
                        'type' => $value['type'],
                    ];
                    $yaml_fixed['states'][] = $state;
                }
            }
            
            $yaml_fixed['yaml'] = $this->configuration;

            return $yaml_fixed;
        } catch (\Symfony\Component\Yaml\Exception\ParseException $ex) {
            throw $ex;
        }
    }