/**
  * Captures hook call result.
  *
  * @param CallResult $hookCallResult
  */
 private function captureHookStat(CallResult $hookCallResult)
 {
     $callee = $hookCallResult->getCall()->getCallee();
     $hook = (string) $callee;
     $path = $callee->getPath();
     $stdOut = $hookCallResult->getStdOut();
     $error = $hookCallResult->getException() ? $this->exceptionPresenter->presentException($hookCallResult->getException()) : null;
     $stat = new HookStat($hook, $path, $error, $stdOut);
     $this->statistics->registerHookStat($stat);
 }