Skip to content

Commit

Permalink
Add functionality on ErrorCollectorTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
steevenz committed Mar 14, 2018
1 parent ae86115 commit 9a194aa
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Traits/Collectors/ErrorCollectorTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function addError( $code, $message )
// ------------------------------------------------------------------------

/**
* ErrorCollectorTrait
* ErrorCollectorTrait::getErrors
*
* Gets errors.
*
Expand All @@ -87,4 +87,16 @@ public function getErrors()
{
return $this->errors;
}

// ------------------------------------------------------------------------

/**
* ErrorCollectorTrait::hasErrors
*
* @return bool
*/
public function hasErrors()
{
return (bool) count($this->errors) ? true : false;
}
}

0 comments on commit 9a194aa

Please sign in to comment.