Skip to content

Commit 0aa5da4

Browse files
[DEV-5254] Expose last rated timestamp with other metadata
2 parents dee12e7 + 7aaf4b0 commit 0aa5da4

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "lovullo/libliza-php",
33
"description": "PHP client for the Liza Data Collection Framework",
4-
"version": "0.7.2",
4+
"version": "0.7.3",
55
"type": "project",
66
"keywords": [ "liza" ],
77
"license": "GPL-3.0+",

src/Document/Document.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,17 @@ public function getInitialRatedDate()
135135
}
136136

137137

138+
/**
139+
* Get the last rated date.
140+
*
141+
* @return int A unix timestamp for the last rating date
142+
*/
143+
public function getLastPremDate()
144+
{
145+
return $this->_getFieldByName( "lastPremDate" );
146+
}
147+
148+
138149
/**
139150
* Get the start date.
140151
*

test/Document/DocumentTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ public function gettersDataProvider()
8787
[ [ "agentEntityId" => "" ], "" ],
8888
[ [ "initialRatedDate" => "fooird" ], "fooird" ],
8989
[ [ "initialRatedDate" => "" ], "" ],
90+
[ [ "lastPremDate" => "12344321" ], "12344321" ],
91+
[ [ "lastPremDate" => "" ], "" ],
9092
[ [ "startDate" => "foosd" ], "foosd" ],
9193
[ [ "startDate" => "" ], "" ],
9294
];
@@ -142,6 +144,7 @@ public function exceptionGettersDataProvider()
142144
[ "getAgentName" ],
143145
[ "getAgentEntityId" ],
144146
[ "getInitialRatedDate" ],
147+
[ "getLastPremDate" ],
145148
[ "getStartDate" ],
146149
];
147150
}

0 commit comments

Comments
 (0)