* @license MIT */ final class GetMethodIfExists { private function __construct() { } public static function get(ReflectionClass $class, string $method) : ?ReflectionMethod { return $class->hasMethod($method) ? $class->getMethod($method) : null; } }