src/Deflection/Transformer.php
public function arrayToDocblockElement(array $definition)
    {
        $docblock = new Docblock();
        if (isset($definition['description'])) {
            $docblock->setDescription($definition['description']);
        }
        if (isset($definition['params'])) {
            foreach ($definition['params'] as $param => $infos) {
                $type = isset($infos['type']) ? $infos['type']: '';
                $description = isset($infos['description']) ? $infos['description'] : '';
                $docblock->addVar($param, $type, $description);
            }
        }
        if (isset($definition['return'])) {
            $docblock->addParam('return', $definition['return']);
        }
        if (isset($definition['infos'])) {
            foreach ($definition['infos'] as $name => $value) {
                $docblock->addParam($name, $value);
            }
        }
        return $docblock;
    }
public function arrayToDocblockElement(array $definition)
    {
        $docblock = new Docblock();
        if (isset($definition['description'])) {
            $docblock->setDescription($definition['description']);
        }
        if (isset($definition['params'])) {
            foreach ($definition['params'] as $param => $infos) {
                $type = isset($infos['type']) ? $infos['type']: '';
                $description = isset($infos['description']) ? $infos['description'] : '';
                $docblock->addVar($param, $type, $description);
            }
        }
        if (isset($definition['return'])) {
            $docblock->addParam('return', $definition['return']);
        }
        if (isset($definition['infos'])) {
            foreach ($definition['infos'] as $name => $value) {
                $docblock->addParam($name, $value);
            }
        }
        return $docblock;
    }
public function arrayToDocblockElement ( array $ definition ) { $ docblock = new Docblock ( ) ; if ( isset ( $ definition [ 'description' ] ) ) { $ docblock -> setDescription ( $ definition [ 'description' ] ) ; } if ( isset ( $ definition [ 'params' ] ) ) { foreach ( $ definition [ 'params' ] as $ param => $ infos ) { $ type = isset ( $ infos [ 'type' ] ) ? $ infos [ 'type' ] : '' ; $ description = isset ( $ infos [ 'description' ] ) ? $ infos [ 'description' ] : '' ; $ docblock -> addVar ( $ param , $ type , $ description ) ; } } if ( isset ( $ definition [ 'return' ] ) ) { $ docblock -> addParam ( 'return' , $ definition [ 'return' ] ) ; } if ( isset ( $ definition [ 'infos' ] ) ) { foreach ( $ definition [ 'infos' ] as $ name => $ value ) { $ docblock -> addParam ( $ name , $ value ) ; } } return $ docblock ; }
Returns well formated header with descriptions, param, return, ...

@param array $definition Header definition

@return Deflection\Element\Docblock
Returns well formated header with descriptions param return ...