function CodeUnit::forClassMethod
@psalm-param class-string $className
Throws
1 call to CodeUnit::forClassMethod()
- Mapper::stringToCodeUnits in vendor/
sebastian/ code-unit/ src/ Mapper.php
File
-
vendor/
sebastian/ code-unit/ src/ CodeUnit.php, line 63
Class
- CodeUnit
- @psalm-immutable
Namespace
SebastianBergmann\CodeUnitCode
public static function forClassMethod(string $className, string $methodName) : ClassMethodUnit {
self::ensureUserDefinedClass($className);
$reflector = self::reflectorForClassMethod($className, $methodName);
return new ClassMethodUnit($className . '::' . $methodName, $reflector->getFileName(), range($reflector->getStartLine(), $reflector->getEndLine()));
}