Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-01-10 22:44:52 +0300
committerJoas Schilling <coding@schilljs.com>2017-01-10 22:45:32 +0300
commitd1e76eb75cc5608835b0fe6c4a2b5706fbabb260 (patch)
treef596e110db78d9565e2b6e3ead4da60573affffa /lib/Settings
parent50c73e47e9599617eb9f004d279697b43cd236bd (diff)
Add tests for Admin settings
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Settings')
-rw-r--r--lib/Settings/Admin.php61
1 files changed, 30 insertions, 31 deletions
diff --git a/lib/Settings/Admin.php b/lib/Settings/Admin.php
index 6c9b4cc79..016218aae 100644
--- a/lib/Settings/Admin.php
+++ b/lib/Settings/Admin.php
@@ -21,51 +21,50 @@
namespace OCA\Spreed\Settings;
+
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IConfig;
use OCP\Settings\ISettings;
-use OCA\Spreed\Util;
-
class Admin implements ISettings {
- /** @var IConfig */
- private $config;
+ /** @var IConfig */
+ private $config;
- public function __construct(IConfig $config) {
- $this->config = $config;
- }
+ public function __construct(IConfig $config) {
+ $this->config = $config;
+ }
- /**
- * @return TemplateResponse
- */
- public function getForm() {
- $parameters = [
+ /**
+ * @return TemplateResponse
+ */
+ public function getForm() {
+ $parameters = [
'stunServer' => $this->config->getAppValue('spreed', 'stun_server', 'stun.nextcloud.com:443'),
'turnServer' => $this->config->getAppValue('spreed', 'turn_server', ''),
'turnServerSecret' => $this->config->getAppValue('spreed', 'turn_server_secret', ''),
'turnServerProtocols' => $this->config->getAppValue('spreed', 'turn_server_protocols', ''),
- ];
+ ];
- return new TemplateResponse('spreed', 'settings-admin', $parameters, '');
- }
+ return new TemplateResponse('spreed', 'settings-admin', $parameters, '');
+ }
- /**
- * @return string the section ID, e.g. 'sharing'
- */
- public function getSection() {
- return 'additional';
- }
+ /**
+ * @return string the section ID, e.g. 'sharing'
+ */
+ public function getSection() {
+ return 'additional';
+ }
- /**
- * @return int whether the form should be rather on the top or bottom of
- * the admin section. The forms are arranged in ascending order of the
- * priority values. It is required to return a value between 0 and 100.
- *
- * E.g.: 70
- */
- public function getPriority() {
- return 30;
- }
+ /**
+ * @return int whether the form should be rather on the top or bottom of
+ * the admin section. The forms are arranged in ascending order of the
+ * priority values. It is required to return a value between 0 and 100.
+ *
+ * E.g.: 70
+ */
+ public function getPriority() {
+ return 30;
+ }
}