summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-03-06 14:51:17 +0100
committerMorris Jobke <hey@morrisjobke.de>2019-03-06 15:43:56 +0100
commit3f9cdeeb5fe9aee97e410ec59bbdd1c9cf3c33d5 (patch)
treeaf97bc7d57dfc676a99d1b19ace4235fac070e9c /lib
parentbdf95ef0eca7ac1db75b743c9d6ca232e6d3f3a3 (diff)
downloadnextcloud-server-3f9cdeeb5fe9aee97e410ec59bbdd1c9cf3c33d5.tar.gz
nextcloud-server-3f9cdeeb5fe9aee97e410ec59bbdd1c9cf3c33d5.zip
Cleanup some PHPDoc leftovers and unused variables
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Archive/Archive.php1
-rw-r--r--lib/private/Collaboration/Collaborators/RemoteGroupPlugin.php4
-rw-r--r--lib/private/Server.php6
-rw-r--r--lib/private/Setup/PostgreSQL.php7
-rw-r--r--lib/private/Share20/Manager.php2
-rw-r--r--lib/private/Template/Base.php1
6 files changed, 2 insertions, 19 deletions
diff --git a/lib/private/Archive/Archive.php b/lib/private/Archive/Archive.php
index da4dfeeec88..64281bec23e 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 c48a1fbae20..6e0979fe418 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 68aba3645cf..6507f58f896 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 8e80c74d968..283ab5f925c 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 884ab4754f5..d253d6bae4c 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 09be5ab7ddf..ba35bb44486 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