Esempio n. 1
0
 /**
  * _parseComment
  *
  * Cleans input comments of stars and /'s so it is more readable.
  * Creates a multi dimensional array. That contains semi parsed comments
  * 
  * Returns an array with the following
  * 'title' contains the title / first line of the doc-block
  * 'desc' contains the remainder of the doc block
  * 'tags' contains all the doc-blocks @tags.
  * 
  * @param string $comments The comment block to be cleaned
  * @return array Array of Filtered and separated comments
  **/
 protected function _parseComment($comments)
 {
     return DocblockTools::parseDocBlock($comments);
 }
 /**
  * test function signature making
  *
  * @return void
  **/
 function testMakeFunctionSignature()
 {
     App::import('Lib', array('ApiGenerator.FunctionDocumentor', 'ApiGenerator.ClassDocumentor'));
     $Func = new FunctionDocumentor('count');
     $result = DocblockTools::makeFunctionSignature($Func);
     $expected = 'count( $var, $mode )';
     $this->assertEqual($result, $expected);
     $Class = new ClassDocumentor('ClassDocumentor');
     $function = $Class->getMethod('_parseComment');
     $result = DocblockTools::makeFunctionSignature($function);
     $expected = '_parseComment( $comments )';
     $this->assertEqual($result, $expected);
 }