class NodeAssignmentFilter in Drupal 7 to 8/9 Module Upgrader 8
Hierarchy
- class \Drupal\drupalmoduleupgrader\Utility\Filter\NodeAssignmentFilter
Expanded class hierarchy of NodeAssignmentFilter
2 files declare their use of NodeAssignmentFilter
- Generic.php in src/
Plugin/ DMU/ Rewriter/ Generic.php - NodeAssignmentFilterTest.php in tests/
src/ Unit/ Utility/ Filter/ NodeAssignmentFilterTest.php
File
- src/
Utility/ Filter/ NodeAssignmentFilter.php, line 8
Namespace
Drupal\drupalmoduleupgrader\Utility\FilterView source
class NodeAssignmentFilter {
/**
* Tests if the given node is on the left side of an assignment.
*
* @param \Pharborist\Node $node
* The node to test.
*
* @return bool
*/
public function __invoke(Node $node) {
/** @var \Pharborist\Operators\AssignNode $assignment */
$assignment = $node
->closest(Filter::isInstanceOf('\\Pharborist\\Operators\\AssignNode'));
return $assignment ? $assignment
->getLeftOperand() === $node : FALSE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
NodeAssignmentFilter:: |
public | function | Tests if the given node is on the left side of an assignment. |