class NoUselessWithFunctionCallsRule implements Rule

Upstream matches the written name and takes the first two arguments by position, so an unpacked list or reordered named arguments were misread. It also reported callbacks that are not callable, which throw instead of returning the value. Its fix dropped the evaluation of the other arguments, and took the value from the analyzed tree instead of the fixer's copy of the call, which broke the fixed file for values such as new Foo().

Methods

__construct(ReflectionProvider $reflectionProvider)

Create a new rule instance.

string
getNodeType()

Get the node type the rule checks.

array
processNode(Node $node, Scope $scope)

Report with() calls whose callback is missing or null.

Details

at line 36
__construct(ReflectionProvider $reflectionProvider)

Create a new rule instance.

Parameters

ReflectionProvider $reflectionProvider

at line 43
string getNodeType()

Get the node type the rule checks.

Return Value

string

at line 53
array processNode(Node $node, Scope $scope)

Report with() calls whose callback is missing or null.

Parameters

Node $node
Scope $scope

Return Value

array