Cleanup some PHPDoc leftovers and unused variables

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2019-03-06 14:51:17 +01:00
parent bdf95ef0ec
commit 3f9cdeeb5f
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
6 changed files with 2 additions and 19 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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(),

View File

@ -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();

View File

@ -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'));
}

View File

@ -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