Esempio n. 1
0
 /**
  * Creates a method code from Reflection
  *
  * @param ParsedMethod $method Reflection for method
  * @param string $body Body of method
  *
  * @return string
  */
 protected function getOverriddenMethod(ParsedMethod $method, $body)
 {
     $code = preg_replace('/ {4}|\\t/', '', $method->getDocComment()) . "\n" . join(' ', Reflection::getModifierNames($method->getModifiers())) . ' function ' . ($method->returnsReference() ? '&' : '') . $method->name . '(' . join(', ', $this->getParameters($method->getParameters())) . ")\n" . "{\n" . $this->indent($body) . "\n" . "}\n";
     return $code;
 }