original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Returns well formated header with descriptions, param, return, ...
  
  @param array $definition Header definition
  
  @return Deflection\Element\Docblock
docstring_tokens: Returns well formated header with descriptions param return ...