Skip to content

Commit 2dbd612

Browse files
committed
WS-3151: Accept IDE suggestions.
1 parent 70694bd commit 2dbd612

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

source/rosette/api/RecordSimilarityParameters.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ class RecordSimilarityParameters extends RosetteParamsSetBase
2626
/**
2727
* @var array
2828
*/
29-
public $fields;
29+
public array $fields;
3030

3131
/**
3232
* @var array
3333
*/
34-
public $properties;
34+
public array $properties;
3535

3636
/**
3737
* @var array
3838
*/
39-
public $records;
39+
public array $records;
4040

4141
/**
4242
* constructor
@@ -45,7 +45,7 @@ class RecordSimilarityParameters extends RosetteParamsSetBase
4545
* @param array $properties - the properties of the comparison
4646
* @param array $records - the records to compare
4747
*/
48-
public function __construct($fields, $properties, $records)
48+
public function __construct(array $fields, array $properties, array $records)
4949
{
5050
$this->fields = $fields;
5151
$this->properties = $properties;
@@ -59,23 +59,23 @@ public function __construct($fields, $properties, $records)
5959
*
6060
* @throws RosetteException
6161
*/
62-
public function validate()
62+
public function validate(): void
6363
{
6464
if (empty($this->fields)) {
6565
throw new RosetteException(
66-
sprintf('Required record similarity parameter not supplied: fields'),
66+
'Required record similarity parameter not supplied: fields',
6767
RosetteException::$BAD_REQUEST_FORMAT
6868
);
6969
}
7070
if (empty($this->properties)) {
7171
throw new RosetteException(
72-
sprintf('Required record similarity parameter not supplied: properties'),
72+
'Required record similarity parameter not supplied: properties',
7373
RosetteException::$BAD_REQUEST_FORMAT
7474
);
7575
}
7676
if (empty($this->records)) {
7777
throw new RosetteException(
78-
sprintf('Required record similarity parameter not supplied: records'),
78+
'Required record similarity parameter not supplied: records',
7979
RosetteException::$BAD_REQUEST_FORMAT
8080
);
8181
}

0 commit comments

Comments
 (0)