Completed
Pull Request — master (#155)
by Sander
02:34
created
lib/Service/SettingsService.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 * @param $value mixed Value of the setting
98 98
 	 */
99 99
 
100
-	public function setUserSetting($key, $value){
100
+	public function setUserSetting($key, $value) {
101 101
 		return $this->config->setUserValue($this->userId, $this->appName, $key, $value);
102 102
 	}
103 103
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 * @param $setting
108 108
 	 * @return bool
109 109
 	 */
110
-	public function isEnabled($setting){
110
+	public function isEnabled($setting) {
111 111
 		$value = intval($this->config->getAppValue('passman', $setting, false));
112 112
 		return ($value === 1);
113 113
 	}
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	 * @param $value mixed Value of the setting
98 98
 	 */
99 99
 
100
-	public function setUserSetting($key, $value){
100
+	public function setUserSetting($key, $value) {
101 101
 		return $this->config->setUserValue($this->userId, $this->appName, $key, $value);
102 102
 	}
103 103
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 * @param $setting
108 108
 	 * @return bool
109 109
 	 */
110
-	public function isEnabled($setting){
110
+	public function isEnabled($setting) {
111 111
 		$value = intval($this->config->getAppValue('passman', $setting, false));
112 112
 		return ($value === 1);
113 113
 	}
Please login to merge, or discard this patch.
middleware/sharemiddleware.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@
 block discarded – undo
12 12
 
13 13
 	private $settings;
14 14
 
15
-	public function __construct(SettingsService $config){
15
+	public function __construct(SettingsService $config) {
16 16
 		$this->settings = $config;
17 17
 	}
18 18
 
19 19
 
20 20
 	public function beforeController($controller, $methodName) {
21
-		if ($controller instanceof ShareController){
21
+		if ($controller instanceof ShareController) {
22 22
 			$setting = ($methodName === 'createPublicShare') ? 'link_sharing_enabled' : 'user_sharing_enabled';
23 23
 			$http_response_code = \OCP\AppFramework\Http::STATUS_FORBIDDEN;
24
-			if($methodName === 'getVaultItems' || $methodName === 'getPendingRequests'){
24
+			if ($methodName === 'getVaultItems' || $methodName === 'getPendingRequests') {
25 25
 				$http_response_code = Http::STATUS_OK;
26 26
 				$result = array();
27 27
 			} else {
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,16 +12,16 @@
 block discarded – undo
12 12
 
13 13
 	private $settings;
14 14
 
15
-	public function __construct(SettingsService $config){
15
+	public function __construct(SettingsService $config) {
16 16
 		$this->settings = $config;
17 17
 	}
18 18
 
19 19
 
20 20
 	public function beforeController($controller, $methodName) {
21
-		if ($controller instanceof ShareController){
21
+		if ($controller instanceof ShareController) {
22 22
 			$setting = ($methodName === 'createPublicShare') ? 'link_sharing_enabled' : 'user_sharing_enabled';
23 23
 			$http_response_code = \OCP\AppFramework\Http::STATUS_FORBIDDEN;
24
-			if($methodName === 'getVaultItems' || $methodName === 'getPendingRequests'){
24
+			if($methodName === 'getVaultItems' || $methodName === 'getPendingRequests') {
25 25
 				$http_response_code = Http::STATUS_OK;
26 26
 				$result = array();
27 27
 			} else {
Please login to merge, or discard this patch.