/**
* Dispatch annotations found in phpDoc with context given in second argument.
*
* @param string $phpDoc phpDoc
* @param mixed $context context
*/
private function processDocComment($phpDoc, $context = null)
{
$annotations = $this->docParser->parse($phpDoc);
foreach ($annotations as $annotation) {
$this->collection->dispatch(Events::TOKEN_PHP_ANNOTATION, new Context\PHP\Annotation($annotation, $context), $this->result);
}
}