Skip to content

Commit

Permalink
[API] Changed toJSON to jsonSerialize and resored strict_types declar…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
spell00 committed Aug 3, 2020
1 parent 8ded678 commit 976796e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modules/api/php/models/projectdicomsrow.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ class ProjectDicomsRow implements \LORIS\Data\DataInstance
/**
* Implements \LORIS\Data\DataInstance interface for this row.
*
* @return string the row data.
* @return array the row data.
*/
public function toJSON() : string
public function jsonSerialize() : array
{
$obj = [
'PSCID' => $this->_pscid,
Expand All @@ -97,7 +97,7 @@ class ProjectDicomsRow implements \LORIS\Data\DataInstance
$obj['Path'] = "/candidates/$candid/$visit/dicoms/$filename";
$obj['InsertTime'] = date('c', (int) $obj['InsertTime']);

return json_encode($obj);
return $obj;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion modules/api/php/models/projectimagesrow.class.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
/**
* PHP Version 7
*
Expand Down

0 comments on commit 976796e

Please sign in to comment.