/** * @param string $contents * * @return array * @throws InvalidArgumentException */ public function process($contents) { if (!is_string($contents)) { throw new InvalidArgumentException("process expects a string to work with."); } $contents = explode("\n", $contents); $fqcn = $this->class_name_getter->process($contents); return $this->extractPublicMethods($fqcn); }
/** * Reflect on the class from it's contents * * @param array $contents * * @return ReflectionClass * @throws InvalidArgumentException * */ private function reflectClass(array $contents) { return $this->reflector->reflect($this->class_name_getter->process($contents)); }