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/Service/TestService.php')
-rw-r--r--lib/Service/TestService.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/Service/TestService.php b/lib/Service/TestService.php
index f362d88..469933a 100644
--- a/lib/Service/TestService.php
+++ b/lib/Service/TestService.php
@@ -1,4 +1,7 @@
<?php
+declare(strict_types=1);
+
+
/**
* FullTextSearch - Full text search framework for Nextcloud
*
@@ -24,13 +27,21 @@
*
*/
+
namespace OCA\FullTextSearch\Service;
+
use OCA\FullTextSearch\Provider\TestProvider;
use OCP\FullTextSearch\Model\DocumentAccess;
use OCP\FullTextSearch\Model\IIndexOptions;
use OCP\FullTextSearch\Model\IndexDocument;
+
+/**
+ * Class TestService
+ *
+ * @package OCA\FullTextSearch\Service
+ */
class TestService {
const DOCUMENT_USER1 = 'user1';
@@ -69,7 +80,7 @@ class TestService {
*
* @return IndexDocument
*/
- public function generateIndexDocumentContentLicense(IIndexOptions $options) {
+ public function generateIndexDocumentContentLicense(IIndexOptions $options): IndexDocument {
$indexDocument = $this->generateIndexDocument(self::DOCUMENT_TYPE_LICENSE);
$content = file_get_contents(__DIR__ . '/../../LICENSE');
@@ -96,7 +107,7 @@ class TestService {
*
* @return IndexDocument
*/
- public function generateIndexDocumentSimple(IIndexOptions $options) {
+ public function generateIndexDocumentSimple(IIndexOptions $options): IndexDocument {
$indexDocument = $this->generateIndexDocument(self::DOCUMENT_TYPE_SIMPLE);
$indexDocument->setContent('document is a simple test');
@@ -141,7 +152,7 @@ class TestService {
*
* @return IndexDocument
*/
- private function generateIndexDocument($documentType) {
+ private function generateIndexDocument(string $documentType): IndexDocument {
$indexDocument = new IndexDocument(TestProvider::TEST_PROVIDER_ID, $documentType);
$access = new DocumentAccess(self::DOCUMENT_USER1);