Skip to content

Commit

Permalink
Keep longest first names if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
XavRsl committed Jun 25, 2018
1 parent f7c229a commit bd2115c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Models/Authors.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ protected function addUnknownAttributes(array $authors, int $counter): void

if (! isset($this->list[$counter][$key]) || empty($this->list[$counter][$key])) {
$this->list[$counter][$key] = $value;
continue;
}

if ('first_name' === $key && strlen($this->list[$counter][$key]) < strlen($value)) {
$this->list[$counter][$key] = $value;
}
}
}
Expand Down

0 comments on commit bd2115c

Please sign in to comment.