Skip to content

Commit 9ea92c1

Browse files
authored
Merge pull request #86 from rosette-api/ws-3270-1.31-updates
ws-3270: 1.31.0 updates
2 parents c685190 + c6b6a41 commit 9ea92c1

3 files changed

Lines changed: 37 additions & 3 deletions

File tree

CI.Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// These are Debian images.
2-
def php_versions = [7.4, 8.0, 8.1, 8.2, 8.3]
2+
def php_versions = [8.1, 8.2, 8.3]
33

44
def runVersion(sourceDir, ver) {
55
mySonarOpts = "-Dsonar.host.url=${env.SONAR_HOST_URL} -Dsonar.login=${env.SONAR_AUTH_TOKEN}"

source/rosette/api/Gender.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
/**
4+
* @copyright 2024 Basis Technology Corporation.
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
7+
* with the License. You may obtain a copy of the License at
8+
* @license http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software distributed under the License is
11+
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and limitations under the License.
13+
**/
14+
15+
namespace rosette\api;
16+
17+
/**
18+
* Class that represents the Gender of a Name.
19+
*/
20+
enum Gender: string
21+
{
22+
case MALE = 'MALE';
23+
case FEMALE = 'FEMALE';
24+
case NONBINARY = 'NONBINARY';
25+
}

source/rosette/api/Name.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Name represents an entity name in Rosette API.
55
*
6-
* @copyright 2014-2015 Basis Technology Corporation.
6+
* @copyright 2014-2024 Basis Technology Corporation.
77
*
88
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
99
* with the License. You may obtain a copy of the License at
@@ -47,17 +47,25 @@ class Name extends RosetteParamsSetBase
4747
*/
4848
public $script;
4949

50+
/**
51+
* Gender of the name. Can be MALE, FEMALE and NONBINARY
52+
*
53+
* @var Gender
54+
*/
55+
public ?Gender $gender;
56+
5057
/**
5158
* Constructor.
5259
*
5360
* @param $text
5461
* @param $entityType
5562
* @param $language
5663
* @param $script
64+
* @param $gender
5765
*
5866
* @throws RosetteException
5967
*/
60-
public function __construct($text, $entityType = null, $language = null, $script = null)
68+
public function __construct($text, $entityType = null, $language = null, $script = null, $gender = null)
6169
{
6270
if ($text === null) {
6371
throw new RosetteException(
@@ -69,6 +77,7 @@ public function __construct($text, $entityType = null, $language = null, $script
6977
$this->entityType = $entityType;
7078
$this->language = $language;
7179
$this->script = $script;
80+
$this->gender = $gender;
7281
}
7382

7483
/**

0 commit comments

Comments
 (0)