Skip to content

Commit

Permalink
min change
Browse files Browse the repository at this point in the history
  • Loading branch information
spiechu committed Jan 21, 2018
1 parent 9794e58 commit 97f6727
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Service/DataCollector.php
Expand Up @@ -196,11 +196,7 @@ public function getApiVersion(): ?string
*/
public function getValidationErrors(): array
{
if (!$this->responseWasChecked()) {
return [];
}

return $this->data[static::DATA_VALIDATION_RESULT]->getViolations();
return $this->responseWasChecked() ? $this->data[static::DATA_VALIDATION_RESULT]->getViolations() : [];
}

/**
Expand Down

0 comments on commit 97f6727

Please sign in to comment.