private function createEdges(Graph $graph, $className)
    {
        $migrationsAnnotations = $this->reader->getClassMigrationMethodInfo($className);

        $parentVertex = $graph->hasVertex($className) ? $graph->getVertex($className) : $graph->createVertex(
            $className
        );

        foreach ($migrationsAnnotations as $migrationsAnnotation) {
            if ($migrationsAnnotation->annotation->from) {
                $fromClass = $migrationsAnnotation->annotation->from;
                $fromVertex = $graph->hasVertex($fromClass) ? $graph->getVertex($fromClass) : $graph->createVertex(
                    $fromClass
                );

                if (!$parentVertex->hasEdgeTo($fromVertex)) {
                    $edge = $fromVertex->createEdgeTo($parentVertex);
                    $this->annotations[$this->getEdgeId($edge)] = $migrationsAnnotation;
                    $this->createEdges($graph, $fromClass);
                }
            }

            if ($migrationsAnnotation->annotation->to) {
                $toClass = $migrationsAnnotation->annotation->to;
                $fromVertex = $graph->hasVertex($toClass) ? $graph->getVertex($toClass) : $graph->createVertex(
                    $toClass
                );

                if (!$parentVertex->hasEdgeTo($fromVertex)) {
                    $edge = $parentVertex->createEdgeTo($fromVertex);
                    $this->annotations[$this->getEdgeId($edge)] = $migrationsAnnotation;
                    $this->createEdges($graph, $toClass);
                }
            }
        }
    }