Пример #1
0
 /**
  * @param Node $node
  * A node to parse
  *
  * @return Context
  * A new or an unchanged context resulting from
  * parsing the node
  */
 public function visitMethodCall(Node $node) : Context
 {
     try {
         $method = AST::classMethodFromNodeInContext($node, $this->context, $this->code_base, $node->children['method'], false);
     } catch (CodeBaseException $exception) {
         Log::err(Log::EUNDEF, $exception->getMessage(), $this->context->getFile(), $node->lineno);
         return $this->context;
     } catch (NodeException $exception) {
         // If we can't figure out what kind of a call
         // this is, don't worry about it
         return $this->context;
     }
     // Check the call for paraemter and argument types
     $this->analyzeCallToMethod($this->code_base, $method, $node);
     return $this->context;
 }
Пример #2
0
 /**
  * @param Node $node
  * A node to parse
  *
  * @return Context
  * A new or an unchanged context resulting from
  * parsing the node
  */
 public function visitMethodCall(Node $node) : Context
 {
     try {
         $method = AST::classMethodFromNodeInContext($node, $this->context, $this->code_base, $node->children['method'], false);
     } catch (CodeBaseException $exception) {
         Log::err(Log::EUNDEF, $exception->getMessage(), $this->context->getFile(), $node->lineno);
         return $this->context;
     } catch (NodeException $exception) {
         // Note to future me:
         // You keep debugging for a long time and landing
         // here. Lets start keeping a counter of how often
         // this turns out to be a problem but you ignore it
         // count = 1
         // If we can't figure out what kind of a call
         // this is, don't worry about it. Errors should
         // have been emitted from elsewhere.
         return $this->context;
     } catch (TypeException $exception) {
         Log::err(Log::EUNDEF, $exception->getMessage(), $this->context->getFile(), $node->lineno);
         return $this->context;
     }
     // Check the call for paraemter and argument types
     $this->analyzeCallToMethod($this->code_base, $method, $node);
     return $this->context;
 }