diff options
author | Joas Schilling <coding@schilljs.com> | 2019-02-12 18:07:59 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2019-02-12 18:07:59 +0300 |
commit | fb90a742312eb92898c56451757ebb3a5d916c88 (patch) | |
tree | fad13d0a9e8530e1a791a26d0086e1ee926d8e73 /lib/Settings | |
parent | af59422720af0d69a29221d13b1b9b32063db603 (diff) |
Make all classes strict
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Settings')
-rw-r--r-- | lib/Settings/Admin/Section.php | 13 | ||||
-rw-r--r-- | lib/Settings/Admin/SignalingServer.php | 7 | ||||
-rw-r--r-- | lib/Settings/Admin/StunServer.php | 7 | ||||
-rw-r--r-- | lib/Settings/Admin/TurnServer.php | 7 | ||||
-rw-r--r-- | lib/Settings/Personal.php | 14 |
5 files changed, 23 insertions, 25 deletions
diff --git a/lib/Settings/Admin/Section.php b/lib/Settings/Admin/Section.php index 34f832f72..a5fd22ef4 100644 --- a/lib/Settings/Admin/Section.php +++ b/lib/Settings/Admin/Section.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com> * @@ -34,10 +35,6 @@ class Section implements IIconSection { /** @var IURLGenerator */ private $url; - /** - * @param IURLGenerator $url - * @param IL10N $l - */ public function __construct(IURLGenerator $url, IL10N $l) { $this->url = $url; $this->l = $l; @@ -50,7 +47,7 @@ class Section implements IIconSection { * @returns string * @since 12 */ - public function getIcon() { + public function getIcon(): string { return $this->url->imagePath('spreed', 'app-dark.svg'); } @@ -61,7 +58,7 @@ class Section implements IIconSection { * @returns string * @since 9.1 */ - public function getID() { + public function getID(): string { return 'talk'; } @@ -72,7 +69,7 @@ class Section implements IIconSection { * @return string * @since 9.1 */ - public function getName() { + public function getName(): string { return $this->l->t('Talk'); } @@ -84,7 +81,7 @@ class Section implements IIconSection { * E.g.: 70 * @since 9.1 */ - public function getPriority() { + public function getPriority(): int { return 70; } } diff --git a/lib/Settings/Admin/SignalingServer.php b/lib/Settings/Admin/SignalingServer.php index ff28d894c..228106eb6 100644 --- a/lib/Settings/Admin/SignalingServer.php +++ b/lib/Settings/Admin/SignalingServer.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @author Joachim Bauch <mail@joachim-bauch.de> * @@ -38,7 +39,7 @@ class SignalingServer implements ISettings { /** * @return TemplateResponse */ - public function getForm() { + public function getForm(): TemplateResponse { $parameters = [ 'signalingServers' => $this->config->getAppValue('spreed', 'signaling_servers'), ]; @@ -49,7 +50,7 @@ class SignalingServer implements ISettings { /** * @return string the section ID, e.g. 'sharing' */ - public function getSection() { + public function getSection(): string { return 'talk'; } @@ -60,7 +61,7 @@ class SignalingServer implements ISettings { * * E.g.: 70 */ - public function getPriority() { + public function getPriority(): int { return 75; } diff --git a/lib/Settings/Admin/StunServer.php b/lib/Settings/Admin/StunServer.php index 4d78ff766..0a2ff2a9e 100644 --- a/lib/Settings/Admin/StunServer.php +++ b/lib/Settings/Admin/StunServer.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com> * @@ -41,7 +42,7 @@ class StunServer implements ISettings { /** * @return TemplateResponse */ - public function getForm() { + public function getForm(): TemplateResponse { $parameters = [ 'stunServer' => $this->config->getAppValue('spreed', 'stun_servers', json_encode(['stun.nextcloud.com:443'])), ]; @@ -52,7 +53,7 @@ class StunServer implements ISettings { /** * @return string the section ID, e.g. 'sharing' */ - public function getSection() { + public function getSection(): string { return 'talk'; } @@ -63,7 +64,7 @@ class StunServer implements ISettings { * * E.g.: 70 */ - public function getPriority() { + public function getPriority(): int { return 65; } diff --git a/lib/Settings/Admin/TurnServer.php b/lib/Settings/Admin/TurnServer.php index a2f70765e..59b66bb70 100644 --- a/lib/Settings/Admin/TurnServer.php +++ b/lib/Settings/Admin/TurnServer.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @author Joachim Bauch <mail@joachim-bauch.de> * @@ -38,7 +39,7 @@ class TurnServer implements ISettings { /** * @return TemplateResponse */ - public function getForm() { + public function getForm(): TemplateResponse { $parameters = [ 'turnServer' => $this->config->getAppValue('spreed', 'turn_servers'), ]; @@ -49,7 +50,7 @@ class TurnServer implements ISettings { /** * @return string the section ID, e.g. 'sharing' */ - public function getSection() { + public function getSection(): string { return 'talk'; } @@ -60,7 +61,7 @@ class TurnServer implements ISettings { * * E.g.: 70 */ - public function getPriority() { + public function getPriority(): int { return 70; } diff --git a/lib/Settings/Personal.php b/lib/Settings/Personal.php index 9d25ebf69..e9d9e001f 100644 --- a/lib/Settings/Personal.php +++ b/lib/Settings/Personal.php @@ -1,4 +1,5 @@ <?php +declare(strict_types=1); /** * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net> * @@ -32,19 +33,16 @@ class Personal implements ISettings { /** @var IConfig */ private $config; - /** @var \OC_Defaults */ - private $defaults; - public function __construct(IConfig $config, \OC_Defaults $defaults) { + public function __construct(IConfig $config) { $this->config = $config; - $this->defaults = $defaults; } /** * @return TemplateResponse returns the instance with all parameters set, ready to be rendered * @since 9.1 */ - public function getForm() { + public function getForm(): TemplateResponse { $parameters = [ 'clients' => $this->getClientLinks() ]; return new TemplateResponse('spreed', 'settings/personal/clients', $parameters); } @@ -53,7 +51,7 @@ class Personal implements ISettings { * @return string the section ID, e.g. 'sharing' * @since 9.1 */ - public function getSection() { + public function getSection(): string { return 'sync-clients'; } @@ -65,7 +63,7 @@ class Personal implements ISettings { * E.g.: 70 * @since 9.1 */ - public function getPriority() { + public function getPriority(): int { return 30; } @@ -74,7 +72,7 @@ class Personal implements ISettings { * * @return array */ - private function getClientLinks() { + private function getClientLinks(): array { $clients = [ 'android' => $this->config->getSystemValue('talk_customclient_android', 'https://play.google.com/store/apps/details?id=com.nextcloud.talk2'), 'ios' => $this->config->getSystemValue('talk_customclient_ios', 'https://geo.itunes.apple.com/us/app/nextcloud-talk/id1296825574') |