Passed
Push — master ( 3da736...5b649d )
by John
10:26 queued 10s
created
apps/files_sharing/lib/Capabilities.php 1 patch
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -33,73 +33,73 @@
 block discarded – undo
33 33
  */
34 34
 class Capabilities implements ICapability {
35 35
 
36
-	/** @var IConfig */
37
-	private $config;
36
+    /** @var IConfig */
37
+    private $config;
38 38
 
39
-	public function __construct(IConfig $config) {
40
-		$this->config = $config;
41
-	}
39
+    public function __construct(IConfig $config) {
40
+        $this->config = $config;
41
+    }
42 42
 
43
-	/**
44
-	 * Return this classes capabilities
45
-	 *
46
-	 * @return array
47
-	 */
48
-	public function getCapabilities() {
49
-		$res = [];
43
+    /**
44
+     * Return this classes capabilities
45
+     *
46
+     * @return array
47
+     */
48
+    public function getCapabilities() {
49
+        $res = [];
50 50
 
51
-		if ($this->config->getAppValue('core', 'shareapi_enabled', 'yes') !== 'yes') {
52
-			$res['api_enabled'] = false;
53
-			$res['public'] = ['enabled' => false];
54
-			$res['user'] = ['send_mail' => false];
55
-			$res['resharing'] = false;
56
-		} else {
57
-			$res['api_enabled'] = true;
51
+        if ($this->config->getAppValue('core', 'shareapi_enabled', 'yes') !== 'yes') {
52
+            $res['api_enabled'] = false;
53
+            $res['public'] = ['enabled' => false];
54
+            $res['user'] = ['send_mail' => false];
55
+            $res['resharing'] = false;
56
+        } else {
57
+            $res['api_enabled'] = true;
58 58
 
59
-			$public = [];
60
-			$public['enabled'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes';
61
-			if ($public['enabled']) {
62
-				$public['password'] = [];
63
-				$public['password']['enforced'] = ($this->config->getAppValue('core', 'shareapi_enforce_links_password', 'no') === 'yes');
59
+            $public = [];
60
+            $public['enabled'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes';
61
+            if ($public['enabled']) {
62
+                $public['password'] = [];
63
+                $public['password']['enforced'] = ($this->config->getAppValue('core', 'shareapi_enforce_links_password', 'no') === 'yes');
64 64
 
65
-				$public['expire_date'] = [];
66
-				$public['multiple_links'] = true;
67
-				$public['expire_date']['enabled'] = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes';
68
-				if ($public['expire_date']['enabled']) {
69
-					$public['expire_date']['days'] = $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
70
-					$public['expire_date']['enforced'] = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no') === 'yes';
71
-				}
65
+                $public['expire_date'] = [];
66
+                $public['multiple_links'] = true;
67
+                $public['expire_date']['enabled'] = $this->config->getAppValue('core', 'shareapi_default_expire_date', 'no') === 'yes';
68
+                if ($public['expire_date']['enabled']) {
69
+                    $public['expire_date']['days'] = $this->config->getAppValue('core', 'shareapi_expire_after_n_days', '7');
70
+                    $public['expire_date']['enforced'] = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'no') === 'yes';
71
+                }
72 72
 
73
-				$public['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'no') === 'yes';
74
-				$public['upload'] = $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes') === 'yes';
75
-				$public['upload_files_drop'] = $public['upload'];
76
-			}
77
-			$res['public'] = $public;
73
+                $public['send_mail'] = $this->config->getAppValue('core', 'shareapi_allow_public_notification', 'no') === 'yes';
74
+                $public['upload'] = $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes') === 'yes';
75
+                $public['upload_files_drop'] = $public['upload'];
76
+            }
77
+            $res['public'] = $public;
78 78
 
79
-			$res['resharing'] = $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes') === 'yes';
79
+            $res['resharing'] = $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes') === 'yes';
80 80
 
81
-			$res['user']['send_mail'] = false;
82
-			$res['user']['expire_date']['enabled'] = true;
81
+            $res['user']['send_mail'] = false;
82
+            $res['user']['expire_date']['enabled'] = true;
83 83
 
84
-			// deprecated in favour of 'group', but we need to keep it for now
85
-			// in order to stay compatible with older clients
86
-			$res['group_sharing'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes';
84
+            // deprecated in favour of 'group', but we need to keep it for now
85
+            // in order to stay compatible with older clients
86
+            $res['group_sharing'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes';
87 87
 
88
-			$res['group'] = [];
89
-			$res['group']['enabled'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes';
90
-			$res['group']['expire_date']['enabled'] = true;
91
-			$res['default_permissions'] = (int)$this->config->getAppValue('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL);
92
-		}
88
+            $res['group'] = [];
89
+            $res['group']['enabled'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes';
90
+            $res['group']['expire_date']['enabled'] = true;
91
+            $res['default_permissions'] = (int)$this->config->getAppValue('core', 'shareapi_default_permissions', Constants::PERMISSION_ALL);
92
+        }
93 93
 
94
-		//Federated sharing
95
-		$res['federation'] = [
96
-			'outgoing'  => $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes',
97
-			'incoming' => $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'yes',
98
-			'expire_date' => ['enabled' => true]
99
-		];
94
+        //Federated sharing
95
+        $res['federation'] = [
96
+            'outgoing'  => $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes',
97
+            'incoming' => $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'yes',
98
+            'expire_date' => ['enabled' => true]
99
+        ];
100 100
 
101
-		return [
102
-			'files_sharing' => $res,
103
-		];
104
-	}
101
+        return [
102
+            'files_sharing' => $res,
103
+        ];
104
+    }
105 105
 }
Please login to merge, or discard this patch.