summaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-01-25 23:16:13 +0100
committerMorris Jobke <hey@morrisjobke.de>2018-01-29 12:03:47 +0100
commiteb51f06a3b9e42686f462b9f7a56411d3fe6cb27 (patch)
tree0d96c86c4489b4e3fe60bcceaeb6759d856a36e9 /apps/files_versions/lib
parent1d8b90b8d3c8a85104d223b7f1d5693280370774 (diff)
downloadnextcloud-server-eb51f06a3b9e42686f462b9f7a56411d3fe6cb27.tar.gz
nextcloud-server-eb51f06a3b9e42686f462b9f7a56411d3fe6cb27.zip
Use ::class statement instead of string
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r--apps/files_versions/lib/AppInfo/Application.php6
-rw-r--r--apps/files_versions/lib/Hooks.php16
2 files changed, 12 insertions, 10 deletions
diff --git a/apps/files_versions/lib/AppInfo/Application.php b/apps/files_versions/lib/AppInfo/Application.php
index f75fea1e117..e09299c8bc8 100644
--- a/apps/files_versions/lib/AppInfo/Application.php
+++ b/apps/files_versions/lib/AppInfo/Application.php
@@ -25,6 +25,8 @@ namespace OCA\Files_Versions\AppInfo;
use OCP\AppFramework\App;
use OCA\Files_Versions\Expiration;
+use OCP\AppFramework\Utility\ITimeFactory;
+use OCA\Files_Versions\Capabilities;
class Application extends App {
public function __construct(array $urlParams = array()) {
@@ -35,7 +37,7 @@ class Application extends App {
/*
* Register capabilities
*/
- $container->registerCapability('OCA\Files_Versions\Capabilities');
+ $container->registerCapability(Capabilities::class);
/*
* Register expiration
@@ -43,7 +45,7 @@ class Application extends App {
$container->registerService('Expiration', function($c) {
return new Expiration(
$c->query('ServerContainer')->getConfig(),
- $c->query('OCP\AppFramework\Utility\ITimeFactory')
+ $c->query(ITimeFactory::class)
);
});
}
diff --git a/apps/files_versions/lib/Hooks.php b/apps/files_versions/lib/Hooks.php
index 52dbf54b485..3c4049e2139 100644
--- a/apps/files_versions/lib/Hooks.php
+++ b/apps/files_versions/lib/Hooks.php
@@ -39,17 +39,17 @@ class Hooks {
public static function connectHooks() {
// Listen to write signals
- \OCP\Util::connectHook('OC_Filesystem', 'write', 'OCA\Files_Versions\Hooks', 'write_hook');
+ \OCP\Util::connectHook('OC_Filesystem', 'write', Hooks::class, 'write_hook');
// Listen to delete and rename signals
- \OCP\Util::connectHook('OC_Filesystem', 'post_delete', 'OCA\Files_Versions\Hooks', 'remove_hook');
- \OCP\Util::connectHook('OC_Filesystem', 'delete', 'OCA\Files_Versions\Hooks', 'pre_remove_hook');
- \OCP\Util::connectHook('OC_Filesystem', 'post_rename', 'OCA\Files_Versions\Hooks', 'rename_hook');
- \OCP\Util::connectHook('OC_Filesystem', 'post_copy', 'OCA\Files_Versions\Hooks', 'copy_hook');
- \OCP\Util::connectHook('OC_Filesystem', 'rename', 'OCA\Files_Versions\Hooks', 'pre_renameOrCopy_hook');
- \OCP\Util::connectHook('OC_Filesystem', 'copy', 'OCA\Files_Versions\Hooks', 'pre_renameOrCopy_hook');
+ \OCP\Util::connectHook('OC_Filesystem', 'post_delete', Hooks::class, 'remove_hook');
+ \OCP\Util::connectHook('OC_Filesystem', 'delete', Hooks::class, 'pre_remove_hook');
+ \OCP\Util::connectHook('OC_Filesystem', 'post_rename', Hooks::class, 'rename_hook');
+ \OCP\Util::connectHook('OC_Filesystem', 'post_copy', Hooks::class, 'copy_hook');
+ \OCP\Util::connectHook('OC_Filesystem', 'rename', Hooks::class, 'pre_renameOrCopy_hook');
+ \OCP\Util::connectHook('OC_Filesystem', 'copy', Hooks::class, 'pre_renameOrCopy_hook');
$eventDispatcher = \OC::$server->getEventDispatcher();
- $eventDispatcher->addListener('OCA\Files::loadAdditionalScripts', ['OCA\Files_Versions\Hooks', 'onLoadFilesAppScripts']);
+ $eventDispatcher->addListener('OCA\Files::loadAdditionalScripts', [Hooks::class, 'onLoadFilesAppScripts']);
}
/**