Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/fulltextsearch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Db/TickRequest.php')
-rw-r--r--lib/Db/TickRequest.php21
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/Db/TickRequest.php b/lib/Db/TickRequest.php
index 4338450..6e50678 100644
--- a/lib/Db/TickRequest.php
+++ b/lib/Db/TickRequest.php
@@ -1,4 +1,7 @@
<?php
+declare(strict_types=1);
+
+
/**
* FullTextSearch - Full text search framework for Nextcloud
*
@@ -24,6 +27,7 @@
*
*/
+
namespace OCA\FullTextSearch\Db;
@@ -31,6 +35,11 @@ use OCA\FullTextSearch\Exceptions\TickDoesNotExistException;
use OCA\FullTextSearch\Model\Tick;
+/**
+ * Class TickRequest
+ *
+ * @package OCA\FullTextSearch\Db
+ */
class TickRequest extends TickRequestBuilder {
@@ -40,7 +49,7 @@ class TickRequest extends TickRequestBuilder {
* @return int
* @throws \Exception
*/
- public function create(Tick $tick) {
+ public function create(Tick $tick): int {
try {
$qb = $this->getTickInsertSql();
@@ -65,7 +74,7 @@ class TickRequest extends TickRequestBuilder {
*
* @return bool
*/
- public function update(Tick $tick) {
+ public function update(Tick $tick): bool {
try {
$this->getTickById($tick->getId());
@@ -117,7 +126,7 @@ class TickRequest extends TickRequestBuilder {
* @return Tick
* @throws TickDoesNotExistException
*/
- public function getTickById($id) {
+ public function getTickById(int $id): Tick {
$qb = $this->getTickSelectSql();
$this->limitToId($qb, $id);
@@ -134,13 +143,13 @@ class TickRequest extends TickRequestBuilder {
/**
- * return tick.
+ * return ticks.
*
* @param string $status
*
* @return Tick[]
*/
- public function getTickByStatus($status) {
+ public function getTicksByStatus(string $status): array {
$ticks = [];
@@ -162,7 +171,7 @@ class TickRequest extends TickRequestBuilder {
*
* @return Tick[]
*/
- public function getTickBySource($source) {
+ public function getTicksBySource(string $source): array {
$qb = $this->getTickSelectSql();
$this->limitToSource($qb, $source);