Ejemplo n.º 1
0
 /**
  * @param Node $node
  *
  * @return null|Node|void
  */
 public function enterNode(Node $node)
 {
     if ($node instanceof Node\FunctionLike) {
         // TODO: Replace these with more advanced resolvers
         $return = DocReturnTypeParser::parseNode($node);
         $param = DocParamTypeParser::parseNode($node);
         //TODO: There must be a cleaner way than getAttribute - traits maybe?
         try {
             $this->index->add($this->file, (string) $node->getAttribute("scopeInner"), $param, $return, $node->getAttribute("scope"));
         } catch (\InvalidArgumentException $e) {
             /* TODO: Ignore duplicates - better recovery on parse failure! */
         }
     }
 }
Ejemplo n.º 2
0
 public function parseNode(FunctionLike $node)
 {
     $docTypes = DocParamTypeParser::parseNode($node);
 }