Skip to content

Commit

Permalink
fix: improve method of getting first array entry
Browse files Browse the repository at this point in the history
  • Loading branch information
winternet-studio committed Jul 17, 2024
1 parent bc5bc38 commit 8291985
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ public function getErrorsFlat() {
* Get a the first error (in flat format)
*/
public function getFirstErrorFlat() {
return $this->getErrorsFlat()[0];
return current($this->getErrorsFlat());
}

/**
Expand Down

0 comments on commit 8291985

Please sign in to comment.