diff options
Diffstat (limited to 'lib')
21 files changed, 102 insertions, 3 deletions
diff --git a/lib/Cron/Index.php b/lib/Cron/Index.php index 4cf8497..f54d47b 100644 --- a/lib/Cron/Index.php +++ b/lib/Cron/Index.php @@ -1,4 +1,6 @@ <?php +declare(strict_types=1); + /** * FullTextSearch - Full text search framework for Nextcloud @@ -25,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Cron; + use Exception; use OC\BackgroundJob\TimedJob; use OCA\FullTextSearch\AppInfo\Application; @@ -73,7 +77,7 @@ class Index extends TimedJob { /** - * @param $argument + * @param mixed $argument * * @throws QueryException */ @@ -137,7 +141,7 @@ class Index extends TimedJob { /** * @return bool */ - private function shouldWeGetAllIndex() { + private function shouldWeGetAllIndex(): bool { $lastErrReset = (int)$this->configService->getAppValue(ConfigService::CRON_LAST_ERR_RESET); if ($lastErrReset === 0) { diff --git a/lib/Exceptions/DatabaseException.php b/lib/Exceptions/DatabaseException.php index b285337..81c82c6 100644 --- a/lib/Exceptions/DatabaseException.php +++ b/lib/Exceptions/DatabaseException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class DatabaseException extends \Exception { } diff --git a/lib/Exceptions/EmptySearchException.php b/lib/Exceptions/EmptySearchException.php index cfec8d9..c5a63e0 100644 --- a/lib/Exceptions/EmptySearchException.php +++ b/lib/Exceptions/EmptySearchException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class EmptySearchException extends \Exception { } diff --git a/lib/Exceptions/IndexDoesNotExistException.php b/lib/Exceptions/IndexDoesNotExistException.php index d113814..cc65d51 100644 --- a/lib/Exceptions/IndexDoesNotExistException.php +++ b/lib/Exceptions/IndexDoesNotExistException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class IndexDoesNotExistException extends \Exception { } diff --git a/lib/Exceptions/InterruptException.php b/lib/Exceptions/InterruptException.php index 6a6f680..d64eb12 100644 --- a/lib/Exceptions/InterruptException.php +++ b/lib/Exceptions/InterruptException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class InterruptException extends \Exception { } diff --git a/lib/Exceptions/MissingDocumentException.php b/lib/Exceptions/MissingDocumentException.php index 2dfa5ae..6e1d955 100644 --- a/lib/Exceptions/MissingDocumentException.php +++ b/lib/Exceptions/MissingDocumentException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class MissingDocumentException extends \Exception { } diff --git a/lib/Exceptions/NoResultException.php b/lib/Exceptions/NoResultException.php index 5bcefd7..4101e86 100644 --- a/lib/Exceptions/NoResultException.php +++ b/lib/Exceptions/NoResultException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class NoResultException extends \Exception { } diff --git a/lib/Exceptions/NotIndexableDocumentException.php b/lib/Exceptions/NotIndexableDocumentException.php index 8f456d4..e9eb34a 100644 --- a/lib/Exceptions/NotIndexableDocumentException.php +++ b/lib/Exceptions/NotIndexableDocumentException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class NotIndexableDocumentException extends \Exception { } diff --git a/lib/Exceptions/PlatformDoesNotExistException.php b/lib/Exceptions/PlatformDoesNotExistException.php index e69e03a..33540d0 100644 --- a/lib/Exceptions/PlatformDoesNotExistException.php +++ b/lib/Exceptions/PlatformDoesNotExistException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class PlatformDoesNotExistException extends \Exception { } diff --git a/lib/Exceptions/PlatformIsNotCompatibleException.php b/lib/Exceptions/PlatformIsNotCompatibleException.php index ee7ebe2..97d27e5 100644 --- a/lib/Exceptions/PlatformIsNotCompatibleException.php +++ b/lib/Exceptions/PlatformIsNotCompatibleException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class PlatformIsNotCompatibleException extends \Exception { } diff --git a/lib/Exceptions/PlatformMustBeSingleException.php b/lib/Exceptions/PlatformMustBeSingleException.php index 04b386e..ca69a7e 100644 --- a/lib/Exceptions/PlatformMustBeSingleException.php +++ b/lib/Exceptions/PlatformMustBeSingleException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class PlatformMustBeSingleException extends \Exception { } diff --git a/lib/Exceptions/PlatformNotDefinedException.php b/lib/Exceptions/PlatformNotDefinedException.php index 2f8ff37..6b6da2c 100644 --- a/lib/Exceptions/PlatformNotDefinedException.php +++ b/lib/Exceptions/PlatformNotDefinedException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class PlatformNotDefinedException extends \Exception { } diff --git a/lib/Exceptions/PlatformNotSelectedException.php b/lib/Exceptions/PlatformNotSelectedException.php index 3c7025e..85d1f33 100644 --- a/lib/Exceptions/PlatformNotSelectedException.php +++ b/lib/Exceptions/PlatformNotSelectedException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class PlatformNotSelectedException extends \Exception { } diff --git a/lib/Exceptions/ProviderDoesNotExistException.php b/lib/Exceptions/ProviderDoesNotExistException.php index 01f51a1..b8e2388 100644 --- a/lib/Exceptions/ProviderDoesNotExistException.php +++ b/lib/Exceptions/ProviderDoesNotExistException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class ProviderDoesNotExistException extends \Exception { } diff --git a/lib/Exceptions/ProviderIsNotCompatibleException.php b/lib/Exceptions/ProviderIsNotCompatibleException.php index b0d7cca..f77feb7 100644 --- a/lib/Exceptions/ProviderIsNotCompatibleException.php +++ b/lib/Exceptions/ProviderIsNotCompatibleException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class ProviderIsNotCompatibleException extends \Exception { } diff --git a/lib/Exceptions/ProviderIsNotUniqueException.php b/lib/Exceptions/ProviderIsNotUniqueException.php index 13a1032..bd5323b 100644 --- a/lib/Exceptions/ProviderIsNotUniqueException.php +++ b/lib/Exceptions/ProviderIsNotUniqueException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class ProviderIsNotUniqueException extends \Exception { } diff --git a/lib/Exceptions/ProviderOptionsDoesNotExistException.php b/lib/Exceptions/ProviderOptionsDoesNotExistException.php index 305f311..3314072 100644 --- a/lib/Exceptions/ProviderOptionsDoesNotExistException.php +++ b/lib/Exceptions/ProviderOptionsDoesNotExistException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class ProviderOptionsDoesNotExistException extends \Exception { } diff --git a/lib/Exceptions/RunnerAlreadyUpException.php b/lib/Exceptions/RunnerAlreadyUpException.php index 4571740..dbfed8d 100644 --- a/lib/Exceptions/RunnerAlreadyUpException.php +++ b/lib/Exceptions/RunnerAlreadyUpException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class RunnerAlreadyUpException extends \Exception { } diff --git a/lib/Exceptions/TickDoesNotExistException.php b/lib/Exceptions/TickDoesNotExistException.php index 7edbc17..6cc6323 100644 --- a/lib/Exceptions/TickDoesNotExistException.php +++ b/lib/Exceptions/TickDoesNotExistException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class TickDoesNotExistException extends \Exception { } diff --git a/lib/Exceptions/TickIsNotAliveException.php b/lib/Exceptions/TickIsNotAliveException.php index 338a804..1721a37 100644 --- a/lib/Exceptions/TickIsNotAliveException.php +++ b/lib/Exceptions/TickIsNotAliveException.php @@ -1,4 +1,7 @@ <?php +declare(strict_types=1); + + /** * FullTextSearch - Full text search framework for Nextcloud * @@ -24,8 +27,10 @@ * */ + namespace OCA\FullTextSearch\Exceptions; + class TickIsNotAliveException extends \Exception { } diff --git a/lib/Model/SearchRequest.php b/lib/Model/SearchRequest.php index 1d21169..f5730be 100644 --- a/lib/Model/SearchRequest.php +++ b/lib/Model/SearchRequest.php @@ -669,7 +669,7 @@ class SearchRequest implements ISearchRequest, JsonSerializable { * * @return SearchRequest */ - public static function fromJSON($json): SearchRequest { + public static function fromJSON(string $json): SearchRequest { return self::fromArray(json_decode($json, true)); } |