Cleanup some PHPDoc leftovers and unused variables
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
bdf95ef0ec
commit
3f9cdeeb5f
|
@ -120,7 +120,6 @@ abstract class Archive {
|
||||||
* add a folder and all its content
|
* add a folder and all its content
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @param string $source
|
* @param string $source
|
||||||
* @return boolean|null
|
|
||||||
*/
|
*/
|
||||||
public function addRecursive($path, $source) {
|
public function addRecursive($path, $source) {
|
||||||
$dh = opendir($source);
|
$dh = opendir($source);
|
||||||
|
|
|
@ -27,10 +27,8 @@ namespace OC\Collaboration\Collaborators;
|
||||||
use OCP\Collaboration\Collaborators\ISearchPlugin;
|
use OCP\Collaboration\Collaborators\ISearchPlugin;
|
||||||
use OCP\Collaboration\Collaborators\ISearchResult;
|
use OCP\Collaboration\Collaborators\ISearchResult;
|
||||||
use OCP\Collaboration\Collaborators\SearchResultType;
|
use OCP\Collaboration\Collaborators\SearchResultType;
|
||||||
use OCP\Contacts\IManager;
|
|
||||||
use OCP\Federation\ICloudFederationProviderManager;
|
use OCP\Federation\ICloudFederationProviderManager;
|
||||||
use OCP\Federation\ICloudIdManager;
|
use OCP\Federation\ICloudIdManager;
|
||||||
use OCP\IConfig;
|
|
||||||
use OCP\Share;
|
use OCP\Share;
|
||||||
|
|
||||||
class RemoteGroupPlugin implements ISearchPlugin {
|
class RemoteGroupPlugin implements ISearchPlugin {
|
||||||
|
@ -38,8 +36,6 @@ class RemoteGroupPlugin implements ISearchPlugin {
|
||||||
|
|
||||||
/** @var ICloudIdManager */
|
/** @var ICloudIdManager */
|
||||||
private $cloudIdManager;
|
private $cloudIdManager;
|
||||||
/** @var IConfig */
|
|
||||||
private $config;
|
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
private $enabled = false;
|
private $enabled = false;
|
||||||
|
|
||||||
|
|
|
@ -497,8 +497,6 @@ class Server extends ServerContainer implements IServerContainer {
|
||||||
ArrayCache::class
|
ArrayCache::class
|
||||||
);
|
);
|
||||||
$config = $c->getConfig();
|
$config = $c->getConfig();
|
||||||
$request = $c->getRequest();
|
|
||||||
$urlGenerator = new URLGenerator($config, $arrayCacheFactory, $request);
|
|
||||||
|
|
||||||
if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {
|
if ($config->getSystemValue('installed', false) && !(defined('PHPUNIT_RUN') && PHPUNIT_RUN)) {
|
||||||
$v = \OC_App::getAppVersions();
|
$v = \OC_App::getAppVersions();
|
||||||
|
@ -970,8 +968,6 @@ class Server extends ServerContainer implements IServerContainer {
|
||||||
return new \OC_Defaults();
|
return new \OC_Defaults();
|
||||||
});
|
});
|
||||||
$this->registerService(SCSSCacher::class, function (Server $c) {
|
$this->registerService(SCSSCacher::class, function (Server $c) {
|
||||||
/** @var Factory $cacheFactory */
|
|
||||||
$cacheFactory = $c->query(Factory::class);
|
|
||||||
return new SCSSCacher(
|
return new SCSSCacher(
|
||||||
$c->getLogger(),
|
$c->getLogger(),
|
||||||
$c->query(\OC\Files\AppData\Factory::class),
|
$c->query(\OC\Files\AppData\Factory::class),
|
||||||
|
@ -985,8 +981,6 @@ class Server extends ServerContainer implements IServerContainer {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
$this->registerService(JSCombiner::class, function (Server $c) {
|
$this->registerService(JSCombiner::class, function (Server $c) {
|
||||||
/** @var Factory $cacheFactory */
|
|
||||||
$cacheFactory = $c->query(Factory::class);
|
|
||||||
return new JSCombiner(
|
return new JSCombiner(
|
||||||
$c->getAppDataDir('js'),
|
$c->getAppDataDir('js'),
|
||||||
$c->getURLGenerator(),
|
$c->getURLGenerator(),
|
||||||
|
|
|
@ -77,23 +77,18 @@ class PostgreSQL extends AbstractDatabase {
|
||||||
|
|
||||||
//create the database
|
//create the database
|
||||||
$this->createDatabase($connection);
|
$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
|
// the connection to dbname=postgres is not needed anymore
|
||||||
$connection->close();
|
$connection->close();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$this->logger->logException($e);
|
$this->logger->logException($e);
|
||||||
$this->logger->warning('Error trying to connect as "postgres", assuming database is setup and tables need to be created');
|
$this->logger->warning('Error trying to connect as "postgres", assuming database is setup and tables need to be created');
|
||||||
$tablesSetup = false;
|
|
||||||
$this->config->setValues([
|
$this->config->setValues([
|
||||||
'dbuser' => $this->dbUser,
|
'dbuser' => $this->dbUser,
|
||||||
'dbpassword' => $this->dbPassword,
|
'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->dbUser = $this->config->getValue('dbuser');
|
||||||
$this->dbPassword = $this->config->getValue('dbpassword');
|
$this->dbPassword = $this->config->getValue('dbpassword');
|
||||||
$connection = $this->connect();
|
$connection = $this->connect();
|
||||||
|
|
|
@ -660,7 +660,7 @@ class Manager implements IManager {
|
||||||
|
|
||||||
// Pre share event
|
// Pre share event
|
||||||
$event = new GenericEvent($share);
|
$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')) {
|
if ($event->isPropagationStopped() && $event->hasArgument('error')) {
|
||||||
throw new \Exception($event->getArgument('error'));
|
throw new \Exception($event->getArgument('error'));
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,6 @@ class Base {
|
||||||
* Appends a variable
|
* Appends a variable
|
||||||
* @param string $key key
|
* @param string $key key
|
||||||
* @param mixed $value value
|
* @param mixed $value value
|
||||||
* @return boolean|null
|
|
||||||
*
|
*
|
||||||
* This function assigns a variable in an array context. If the key already
|
* This function assigns a variable in an array context. If the key already
|
||||||
* exists, the value will be appended. It can be accessed via
|
* exists, the value will be appended. It can be accessed via
|
||||||
|
|
Loading…
Reference in New Issue