private function appendDoc(Annotation $e)
 {
     $this->appendString('/**' . PHP_EOL);
     $annotation = $e->toDocAnnotation();
     // walk line by line
     foreach (preg_split('/$\\R?^/m', $annotation) as $line) {
         $this->appendString(" * {$line}" . PHP_EOL);
     }
     $this->appendString(' */' . PHP_EOL . PHP_EOL);
 }
 /**
  * Asserts the annotation converts validly. Necessary since ordering of
  * parameters in annotations can be arbitrary (based on the order they
  * are declared).
  *
  * @param annotation Annotation Annotation object to test
  */
 private function assertGoodConversion(Annotation $annotation)
 {
     $docString = $annotation->toDocAnnotation();
     $docString = "/** {$docString} */";
     $derivedAnnotations = $this->docParser->parse($docString);
     // only one annotation, so just take what the internal pointer points to
     $derivedAnnotation = current($derivedAnnotations);
     $this->assertFalse($derivedAnnotation === false);
     $this->assertTrue($annotation == $derivedAnnotation);
 }