You are here

abstract public function FunctionCallModifier::rewrite in Drupal 7 to 8/9 Module Upgrader 8

Tries to rewrite the original function call.

Parameters

\Pharborist\Functions\FunctionCallNode $call: The original function call.

\Drupal\drupalmoduleupgrader\TargetInterface $target: The target module.

Return value

\Pharborist\Node|null If the original function call is returned (determined by object identity), the function call is not replaced. If a different node is returned, it will replace the original call. And if nothing is returned, the original call is commented out with a FIXME.

1 call to FunctionCallModifier::rewrite()
FunctionCallModifier::convert in src/Plugin/DMU/Converter/Functions/FunctionCallModifier.php
Performs required conversions.
52 methods override FunctionCallModifier::rewrite()
CacheGet::rewrite in src/Plugin/DMU/Converter/Functions/CacheGet.php
Tries to rewrite the original function call.
CacheSet::rewrite in src/Plugin/DMU/Converter/Functions/CacheSet.php
Tries to rewrite the original function call.
CommentLoad::rewrite in src/Plugin/DMU/Converter/Functions/CommentLoad.php
Tries to rewrite the original function call.
CToolsGetPlugins::rewrite in src/Plugin/DMU/Converter/Functions/CToolsGetPlugins.php
Tries to rewrite the original function call.
CToolsObjectCacheGet::rewrite in src/Plugin/DMU/Converter/Functions/CToolsObjectCacheGet.php
Tries to rewrite the original function call.

... See full list

File

src/Plugin/DMU/Converter/Functions/FunctionCallModifier.php, line 28

Class

FunctionCallModifier
Base class for converters which modify individual function calls.

Namespace

Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions

Code

public abstract function rewrite(FunctionCallNode $call, TargetInterface $target);