Skip to content

Commit 7c69b13

Browse files
authored
Update LanguageResult.php
1 parent f6db74b commit 7c69b13

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/LanguageResult.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public function isReliable(): bool
4949
if (!$this->language || $this->numNgrams < 3 || !$this->scores) {
5050
return false;
5151
}
52+
reset($this->scores);
5253
// A minimum of a 24% from the average score
5354
if ($this->avgScore[$this->language] * 0.24 > ($this->scores[$this->language] / $this->numNgrams)
5455
|| 0.01 > abs($this->scores[$this->language] - next($this->scores))) {

0 commit comments

Comments
 (0)