public function generateDry($layer_name, $primitive_name, FQCN $qcn): array
    {
        $primitive = $this->getPrimitiveByName($primitive_name);
        $layer     = $this->getLayerByName($layer_name);
        
        $this->updatePlaceholders(
            [
                // default for given layer
                "/*<BASE_TEST_NAMESPACE>*/" => $layer->getTestsFqcn()->getFqcn(),
                "/*<BASE_SRC_NAMESPACE>*/" => $layer->getSrcFqcn()->getFqcn(),
                
                "/*<LAYER>*/" => $layer->getName(),
                "/*<PRIMITIVE>*/" => $primitive_name,
                
                "/*<PSR4_NAMESPACE>*/" => $qcn->getFqcn(),
                "/*<PSR4_NAMESPACE_BASE>*/" => $qcn->getBasePart(),
                "/*<PSR4_NAMESPACE_LAST>*/" => $qcn->getLastPart(),
            
            ]);
        $generated_stubs = $this->generateStubs($primitive, $layer, $qcn);
        
        return $generated_stubs;
    }
public function generateDry($layer_name, $primitive_name, FQCN $qcn): array
    {
        $primitive = $this->getPrimitiveByName($primitive_name);
        $layer     = $this->getLayerByName($layer_name);
        
        $this->updatePlaceholders(
            [
                // default for given layer
                "/*<BASE_TEST_NAMESPACE>*/" => $layer->getTestsFqcn()->getFqcn(),
                "/*<BASE_SRC_NAMESPACE>*/" => $layer->getSrcFqcn()->getFqcn(),
                
                "/*<LAYER>*/" => $layer->getName(),
                "/*<PRIMITIVE>*/" => $primitive_name,
                
                "/*<PSR4_NAMESPACE>*/" => $qcn->getFqcn(),
                "/*<PSR4_NAMESPACE_BASE>*/" => $qcn->getBasePart(),
                "/*<PSR4_NAMESPACE_LAST>*/" => $qcn->getLastPart(),
            
            ]);
        $generated_stubs = $this->generateStubs($primitive, $layer, $qcn);
        
        return $generated_stubs;
    }
public function generateDry ( $ layer_name , $ primitive_name , FQCN $ qcn ) : array { $ primitive = $ this -> getPrimitiveByName ( $ primitive_name ) ; $ layer = $ this -> getLayerByName ( $ layer_name ) ; $ this -> updatePlaceholders ( [ // default for given layer "/*<BASE_TEST_NAMESPACE>*/" => $ layer -> getTestsFqcn ( ) -> getFqcn ( ) , "/*<BASE_SRC_NAMESPACE>*/" => $ layer -> getSrcFqcn ( ) -> getFqcn ( ) , "/*<LAYER>*/" => $ layer -> getName ( ) , "/*<PRIMITIVE>*/" => $ primitive_name , "/*<PSR4_NAMESPACE>*/" => $ qcn -> getFqcn ( ) , "/*<PSR4_NAMESPACE_BASE>*/" => $ qcn -> getBasePart ( ) , "/*<PSR4_NAMESPACE_LAST>*/" => $ qcn -> getLastPart ( ) , ] ) ; $ generated_stubs = $ this -> generateStubs ( $ primitive , $ layer , $ qcn ) ; return $ generated_stubs ; }
generateDry - prepare map of new final files to source stubs

@param string $layer_name     f.e. app or infrastructure
@param string $primitive_name f.e. event
@param FQCN   $qcn            f.e. Some/Namespaced/Name

@return array
generateDry - prepare map of new final files to source stubs