public function formatMethod(ReflectionMethod $method) { // $params = []; // foreach ($method->getParameters() as $parameter) { // $params[] = '$' . $parameter->getName(); // } $ml = Multiline::create($method->getLocatedSource()->getSource()); return trim($ml[$method->getStartLine() - 1]); // return sprintf('%s(%s)', $method->getName(), implo/de(', ', $params)); }