From 3f9cdeeb5fe9aee97e410ec59bbdd1c9cf3c33d5 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 6 Mar 2019 14:51:17 +0100 Subject: [PATCH] Cleanup some PHPDoc leftovers and unused variables Signed-off-by: Morris Jobke --- lib/private/Archive/Archive.php | 1 - .../Collaboration/Collaborators/RemoteGroupPlugin.php | 4 ---- lib/private/Server.php | 6 ------ lib/private/Setup/PostgreSQL.php | 7 +------ lib/private/Share20/Manager.php | 2 +- lib/private/Template/Base.php | 1 - 6 files changed, 2 insertions(+), 19 deletions(-) diff --git a/lib/private/Archive/Archive.php b/lib/private/Archive/Archive.php index da4dfeeec8..64281bec23 100644 --- a/lib/private/Archive/Archive.php +++ b/lib/private/Archive/Archive.php @@ -120,7 +120,6 @@ abstract class Archive { * add a folder and all its content * @param string $path * @param string $source - * @return boolean|null */ public function addRecursive($path, $source) { $dh = opendir($source); diff --git a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php index c48a1fbae2..6e0979fe41 100644 --- a/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php +++ b/lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php @@ -27,10 +27,8 @@ namespace OC\Collaboration\Collaborators; use OCP\Collaboration\Collaborators\ISearchPlugin; use OCP\Collaboration\Collaborators\ISearchResult; use OCP\Collaboration\Collaborators\SearchResultType; -use OCP\Contacts\IManager; use OCP\Federation\ICloudFederationProviderManager; use OCP\Federation\ICloudIdManager; -use OCP\IConfig; use OCP\Share; class RemoteGroupPlugin implements ISearchPlugin { @@ -38,8 +36,6 @@ class RemoteGroupPlugin implements ISearchPlugin { /** @var ICloudIdManager */ private $cloudIdManager; - /** @var IConfig */ - private $config; /** @var bool */ private $enabled = false; diff --git a/lib/private/Server.php b/lib/private/Server.php index 68aba3645c..6507f58f89 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -497,8 +497,6 @@ class Server extends ServerContainer implements IServerContainer { ArrayCache::class ); $config = $c->getConfig(); - $request = $c->getRequest(); - $urlGenerator = new URLGenerator($config, $arrayCacheFactory, $request); if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) { $v = \OC_App::getAppVersions(); @@ -970,8 +968,6 @@ class Server extends ServerContainer implements IServerContainer { return new \OC_Defaults(); }); $this->registerService(SCSSCacher::class, function (Server $c) { - /** @var Factory $cacheFactory */ - $cacheFactory = $c->query(Factory::class); return new SCSSCacher( $c->getLogger(), $c->query(\OC\Files\AppData\Factory::class), @@ -985,8 +981,6 @@ class Server extends ServerContainer implements IServerContainer { ); }); $this->registerService(JSCombiner::class, function (Server $c) { - /** @var Factory $cacheFactory */ - $cacheFactory = $c->query(Factory::class); return new JSCombiner( $c->getAppDataDir('js'), $c->getURLGenerator(), diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php index 8e80c74d96..283ab5f925 100644 --- a/lib/private/Setup/PostgreSQL.php +++ b/lib/private/Setup/PostgreSQL.php @@ -77,23 +77,18 @@ class PostgreSQL extends AbstractDatabase { //create the database $this->createDatabase($connection); - $query = $connection->prepare("select count(*) FROM pg_class WHERE relname=? limit 1"); - $query->execute([$this->tablePrefix . "users"]); - $tablesSetup = $query->fetchColumn() > 0; - // the connection to dbname=postgres is not needed anymore $connection->close(); } catch (\Exception $e) { $this->logger->logException($e); $this->logger->warning('Error trying to connect as "postgres", assuming database is setup and tables need to be created'); - $tablesSetup = false; $this->config->setValues([ 'dbuser' => $this->dbUser, 'dbpassword' => $this->dbPassword, ]); } - // connect to the ownCloud database (dbname=$this->dbname) and check if it needs to be filled + // connect to the database (dbname=$this->dbname) and check if it needs to be filled $this->dbUser = $this->config->getValue('dbuser'); $this->dbPassword = $this->config->getValue('dbpassword'); $connection = $this->connect(); diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 884ab4754f..d253d6bae4 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -660,7 +660,7 @@ class Manager implements IManager { // Pre share event $event = new GenericEvent($share); - $a = $this->eventDispatcher->dispatch('OCP\Share::preShare', $event); + $this->eventDispatcher->dispatch('OCP\Share::preShare', $event); if ($event->isPropagationStopped() && $event->hasArgument('error')) { throw new \Exception($event->getArgument('error')); } diff --git a/lib/private/Template/Base.php b/lib/private/Template/Base.php index 09be5ab7dd..ba35bb4448 100644 --- a/lib/private/Template/Base.php +++ b/lib/private/Template/Base.php @@ -107,7 +107,6 @@ class Base { * Appends a variable * @param string $key key * @param mixed $value value - * @return boolean|null * * This function assigns a variable in an array context. If the key already * exists, the value will be appended. It can be accessed via