Skip to content

Commit 96cedbe

Browse files
committed
DisputeType: added 3 more enum values as returned by the server.
1 parent c587b34 commit 96cedbe

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

src/org/nameapi/client/services/parser/personnameparser/DisputeType.php

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,38 @@
77
* Class DisputeType
88
*
99
* Possible values are:
10+
*
1011
* GENDER
12+
* The gender of the name, as it was interpreted, contradicts the gender of the input person.
13+
* Either the person was entered with a gender (male or female), and the name is used for the
14+
* other gender. For example female Daniel.
15+
* Or the Gender was found in the name itself, such as "Mr. Daniela Johnson", and contradicts the
16+
* name.
17+
*
18+
* There are 3 possibilities here.
19+
* 1) the gender is wrong (or the gender-specific term like salutation "Mr.")
20+
* 2) the gender is right, but the name is misspelled (eg Daniel instead of Daniela, or Karim instead of Karin)
21+
* 3) all input is correct, but the system thinks otherwise because it doesn't know that name in that
22+
* culture yet. For example a Turkish name could be neutral, but is stored as male, and therefore
23+
* says for the female person the gender contradicts.
24+
*
1125
* SPELLING
26+
* The input name is, as it was interpreted, spelled incorrectly.
27+
* There are 2 possibilities here.
28+
* 1) the input name is misspelled
29+
* 2) the input name is correctly spelled, but is rare (more rare than the misspelling) or not known by the system.
30+
*
31+
* TRANSPOSITION
32+
* Aka swapped names, eg gn in sn field and vice versa.
33+
* @since 5.3
34+
*
35+
* DUPLICATE_CONTENT
36+
* EG the surname appears [Peter Smith, Smith] or the title [Dr, Dr John, Smith]
37+
* @since 5.3
38+
*
39+
* SYNTAX
40+
* When the string is syntactically broken and needs a fix, eg comma or dot in the wrong place, spacing errors.
41+
* @since 5.3
1242
*
1343
*/
1444
final class DisputeType {
@@ -19,7 +49,7 @@ final class DisputeType {
1949
private $value = null;
2050

2151
public function __construct($value) {
22-
if ($value!=='GENDER' && $value!=='SPELLING') {
52+
if ($value!=='GENDER' && $value!=='SPELLING' && $value!=='TRANSPOSITION' && $value!=='DUPLICATE_CONTENT' && $value!=='SYNTAX') {
2353
throw new \Exception('Invalid value for DisputeType: '.$value.'!');
2454
}
2555
$this->value = $value;

0 commit comments

Comments
 (0)