public function leaveNode(PhpParser\Node $node) { if (!$node instanceof FuncCall) { return; } if (!$node->name instanceof Name) { return; } if ($node->name->isUnqualified() && !CIPHPUnitTestFunctionPatcher::isBlacklisted((string) $node->name)) { $replacement = new FullyQualified(array()); $replacement->set('CIPHPUnitTestFunctionPatcherProxy::' . (string) $node->name); $pos = $node->getAttribute('startTokenPos'); CIPHPUnitTestFunctionPatcher::$replacement[$pos] = '\\CIPHPUnitTestFunctionPatcherProxy::' . (string) $node->name; $node->name = $replacement; } }
/** * Set some attributes to their appropriate values * * This includes the 'path', 'line(s)', and 'documentation' attributes. * @return string */ public function set_attributes() { $this->attributes['path'] = $this->node->getAttribute('scope'); $this->set_lines_attribute(); $this->set_doc_attribute(); }