/**
  * Log any build exceptions from the CheckStyle report.
  */
 public function logBuildExceptions()
 {
     if ($this->artifact) {
         foreach ($this->artifact->xpath('//file') as $file) {
             foreach ($file->xpath('//error') as $error) {
                 $exception = new Build\BuildException();
                 $exception->setAsset(basename($file['name']));
                 $exception->setReference($error['line']);
                 $exception->setType('E');
                 $exception->setMessage($error['message']);
                 $this->build->addException($exception);
             }
         }
     }
 }