コード例 #1
0
 /**
  * @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);
 }
コード例 #2
0
 /**
  * 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));
 }