arrayCallableToMethodCallFactory = $arrayCallableToMethodCallFactory;
}
public function getRuleDefinition() : RuleDefinition
{
return new RuleDefinition('Refactor call_user_func() on known class method to a method call', [new CodeSample(<<<'CODE_SAMPLE'
final class SomeClass
{
public function run()
{
$result = \call_user_func([$this->property, 'method'], $args);
}
}
CODE_SAMPLE
, <<<'CODE_SAMPLE'
final class SomeClass
{
public function run()
{
$result = $this->property->method($args);
}
}
CODE_SAMPLE
)]);
}
/**
* @return array