Example #1
0
 /**
  * @inheritdoc
  */
 public function getErrorMessage()
 {
     if ($this->errors && $this->errors->count() > 0) {
         /** @var Error $firstError */
         $firstError = $this->errors->first();
         return $firstError->getMessage();
     }
     return new String('');
 }
 /**
  * @inheritdoc
  */
 public function addErrors(ErrorCollection $errors)
 {
     foreach ($errors as $error) {
         $this->errors->add($error);
     }
 }