improved error reporting
This commit is contained in:
@ -24,4 +24,26 @@ final class CSVXMLValidator
|
||||
$inv_errors = [];
|
||||
$depcon_errors = [];
|
||||
}
|
||||
|
||||
public function addError(String $error)
|
||||
{
|
||||
$this->error_msgs[] = $error;
|
||||
}
|
||||
|
||||
public function addInvError(String $error)
|
||||
{
|
||||
$this->inv_errors[] = $error;
|
||||
}
|
||||
|
||||
public function addDepconError(String $error)
|
||||
{
|
||||
$this->depcon_errors[] = $error;
|
||||
}
|
||||
|
||||
public function overallErrorCount(): int
|
||||
{
|
||||
return count($this->error_msgs)
|
||||
+ count($this->inv_errors)
|
||||
+ count($this->depcon_errors);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user