src/SellerLabs/Nucleus/Meditation/SpecGraphFactory.php
public function done()
    {
        $graph = clone $this->graph;

        foreach ($this->nodeFactories as $factory) {
            if (!$factory->isValid()) {
                throw new LackOfCoffeeException(
                    vsprintf(
                        'Definition for the node "%s" is invalid.',
                        [$factory->getName()]
                    )
                );
            }

            $graph->add(
                $factory->getName(),
                $factory->getDependencies(),
                $factory->getSpec()
            );
        }

        return $graph;
    }
public function done()
    {
        $graph = clone $this->graph;

        foreach ($this->nodeFactories as $factory) {
            if (!$factory->isValid()) {
                throw new LackOfCoffeeException(
                    vsprintf(
                        'Definition for the node "%s" is invalid.',
                        [$factory->getName()]
                    )
                );
            }

            $graph->add(
                $factory->getName(),
                $factory->getDependencies(),
                $factory->getSpec()
            );
        }

        return $graph;
    }
public function done ( ) { $ graph = clone $ this -> graph ; foreach ( $ this -> nodeFactories as $ factory ) { if ( ! $ factory -> isValid ( ) ) { throw new LackOfCoffeeException ( vsprintf ( 'Definition for the node "%s" is invalid.' , [ $ factory -> getName ( ) ] ) ) ; } $ graph -> add ( $ factory -> getName ( ) , $ factory -> getDependencies ( ) , $ factory -> getSpec ( ) ) ; } return $ graph ; }
Return the finished SpecGraph.

@throws LackOfCoffeeException
@return SpecGraph
Return the finished SpecGraph .