diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2017-12-27 17:54:23 +0300 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2017-12-27 17:54:23 +0300 |
commit | f756c48a5d23015379da9b2699eb168bb403ffd4 (patch) | |
tree | 826aad9ac6648c827877c13cbf3c65b66fb2f41b /lib/Model | |
parent | adaac3c7f042977b9aad9c85fc3dacd624ed1754 (diff) |
cleaning
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Model')
-rw-r--r-- | lib/Model/Index.php | 14 | ||||
-rw-r--r-- | lib/Model/IndexDocument.php | 6 | ||||
-rw-r--r-- | lib/Model/SearchResult.php | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/lib/Model/Index.php b/lib/Model/Index.php index bcce175..9dba1c2 100644 --- a/lib/Model/Index.php +++ b/lib/Model/Index.php @@ -55,8 +55,8 @@ class Index implements \JsonSerializable { /** @var int */ private $err = 0; - /** @var string */ - private $lastIndex = '0'; + /** @var int */ + private $lastIndex = 0; public function __construct($providerId, $documentId) { @@ -133,7 +133,7 @@ class Index implements \JsonSerializable { /** - * @param string $err + * @param int $err * * @return $this */ @@ -152,12 +152,12 @@ class Index implements \JsonSerializable { /** - * @param string $lastIndex + * @param int $lastIndex * * @return $this */ - public function setLastIndex($lastIndex = '') { - if ($lastIndex === '') { + public function setLastIndex($lastIndex = -1) { + if ($lastIndex === -1) { $lastIndex = time(); } @@ -167,7 +167,7 @@ class Index implements \JsonSerializable { } /** - * @return string + * @return int */ public function getLastIndex() { return $this->lastIndex; diff --git a/lib/Model/IndexDocument.php b/lib/Model/IndexDocument.php index a600887..00cdfdb 100644 --- a/lib/Model/IndexDocument.php +++ b/lib/Model/IndexDocument.php @@ -81,7 +81,7 @@ class IndexDocument implements \JsonSerializable { /** - * @param string $id + * @param string|integer $id * * @return $this */ @@ -92,7 +92,7 @@ class IndexDocument implements \JsonSerializable { } /** - * @return string + * @return string|integer */ public function getId() { return $this->id; @@ -402,7 +402,7 @@ class IndexDocument implements \JsonSerializable { } /** - * @return array + * @return array<string,string|integer|DocumentAccess|array> */ public function jsonSerialize() { return [ diff --git a/lib/Model/SearchResult.php b/lib/Model/SearchResult.php index d0e1bf1..46f97f6 100644 --- a/lib/Model/SearchResult.php +++ b/lib/Model/SearchResult.php @@ -110,7 +110,7 @@ class SearchResult implements \JsonSerializable { /** - * @return array + * @return array<string,array<string,string>|IndexDocument[]|integer> */ public function jsonSerialize() { |