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:
authorMaxence Lange <maxence@artificial-owl.com>2018-10-31 12:33:02 +0300
committerMaxence Lange <maxence@artificial-owl.com>2018-10-31 12:33:02 +0300
commit2fc15a8ea64385ecc2edbc74ba5ea618f1e203b2 (patch)
tree64e106a06373d6e84a4d089a5e77e884fd713768
parent41bbf7c16c715de4aca54b413ccbfe1d526e73b4 (diff)
migrating to php7
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-rw-r--r--appinfo/app.php6
-rw-r--r--appinfo/routes.php4
-rw-r--r--lib/AppInfo/Application.php31
3 files changed, 24 insertions, 17 deletions
diff --git a/appinfo/app.php b/appinfo/app.php
index 74de16e..20c5b72 100644
--- a/appinfo/app.php
+++ b/appinfo/app.php
@@ -1,4 +1,7 @@
<?php
+declare(strict_types=1);
+
+
/**
* FullTextSearch - Full text search framework for Nextcloud
*
@@ -24,8 +27,10 @@
*
*/
+
namespace OCA\FullTextSearch\AppInfo;
+
use OCP\AppFramework\QueryException;
@@ -33,7 +38,6 @@ try {
$app = new Application();
$app->registerServices();
$app->registerNavigation();
- $app->registerSettingsAdmin();
} catch (QueryException $e) {
/** we do nothing */
}
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 9736b22..967ac82 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -1,4 +1,7 @@
<?php
+declare(strict_types=1);
+
+
/**
* FullTextSearch - Full text search framework for Nextcloud
*
@@ -24,6 +27,7 @@
*
*/
+
return [
'routes' => [
['name' => 'Navigation#navigate', 'url' => '/', 'verb' => 'GET'],
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index 61122c6..76f89db 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -1,4 +1,7 @@
<?php
+declare(strict_types=1);
+
+
/**
* FullTextSearch - Full text search framework for Nextcloud
*
@@ -24,8 +27,10 @@
*
*/
+
namespace OCA\FullTextSearch\AppInfo;
+
use OCA\FullTextSearch\Capabilities;
use OCA\FullTextSearch\Service\ConfigService;
use OCA\FullTextSearch\Service\IndexService;
@@ -36,30 +41,26 @@ use OCP\AppFramework\IAppContainer;
use OCP\AppFramework\QueryException;
use OCP\FullTextSearch\IFullTextSearchManager;
+
class Application extends App {
+
const APP_NAME = 'fulltextsearch';
/** @var IAppContainer */
private $container;
+
/**
+ * Application constructor.
+ *
* @param array $params
*/
- public function __construct(array $params = array()) {
+ public function __construct(array $params = []) {
parent::__construct(self::APP_NAME, $params);
$this->container = $this->getContainer();
$this->container->registerCapability(Capabilities::class);
-
- $this->registerHooks();
- }
-
-
- /**
- * Register Hooks
- */
- public function registerHooks() {
}
@@ -88,7 +89,6 @@ class Application extends App {
* @throws QueryException
*/
public function registerNavigation() {
-
/** @var ConfigService $configService */
$configService = $this->container->query(ConfigService::class);
if ($configService->getAppValue(ConfigService::APP_NAVIGATION) !== '1') {
@@ -101,7 +101,10 @@ class Application extends App {
}
- private function fullTextSearchNavigation() {
+ /**
+ * @return array
+ */
+ private function fullTextSearchNavigation(): array {
$urlGen = \OC::$server->getURLGenerator();
$navName = \OC::$server->getL10N(self::APP_NAME)
->t('Full text search');
@@ -116,9 +119,5 @@ class Application extends App {
}
- public function registerSettingsAdmin() {
- // \OCP\App::registerAdmin(self::APP_NAME, 'lib/admin');
- }
-
}