Passed
Push — master ( c82c1d...5e4ee4 )
by Roeland
10:52 queued 11s
created
lib/private/Support/Subscription/Registry.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -35,70 +35,70 @@
 block discarded – undo
35 35
 
36 36
 class Registry implements IRegistry {
37 37
 
38
-	/** @var ISubscription */
39
-	private $subscription = null;
38
+    /** @var ISubscription */
39
+    private $subscription = null;
40 40
 
41
-	/** @var IConfig */
42
-	private $config;
41
+    /** @var IConfig */
42
+    private $config;
43 43
 
44
-	public function __construct(IConfig $config) {
45
-		$this->config = $config;
46
-	}
44
+    public function __construct(IConfig $config) {
45
+        $this->config = $config;
46
+    }
47 47
 
48
-	/**
49
-	 * Register a subscription instance. In case it is called multiple times the
50
-	 * first one is used.
51
-	 *
52
-	 * @param ISubscription $subscription
53
-	 * @throws AlreadyRegisteredException
54
-	 *
55
-	 * @since 17.0.0
56
-	 */
57
-	public function register(ISubscription $subscription): void {
58
-		if ($this->subscription !== null) {
59
-			throw new AlreadyRegisteredException();
60
-		}
61
-		$this->subscription = $subscription;
62
-	}
48
+    /**
49
+     * Register a subscription instance. In case it is called multiple times the
50
+     * first one is used.
51
+     *
52
+     * @param ISubscription $subscription
53
+     * @throws AlreadyRegisteredException
54
+     *
55
+     * @since 17.0.0
56
+     */
57
+    public function register(ISubscription $subscription): void {
58
+        if ($this->subscription !== null) {
59
+            throw new AlreadyRegisteredException();
60
+        }
61
+        $this->subscription = $subscription;
62
+    }
63 63
 
64
-	/**
65
-	 * Fetches the list of app IDs that are supported by the subscription
66
-	 *
67
-	 * @since 17.0.0
68
-	 */
69
-	public function delegateGetSupportedApps(): array {
70
-		if ($this->subscription instanceof ISupportedApps) {
71
-			return $this->subscription->getSupportedApps();
72
-		}
73
-		return [];
74
-	}
64
+    /**
65
+     * Fetches the list of app IDs that are supported by the subscription
66
+     *
67
+     * @since 17.0.0
68
+     */
69
+    public function delegateGetSupportedApps(): array {
70
+        if ($this->subscription instanceof ISupportedApps) {
71
+            return $this->subscription->getSupportedApps();
72
+        }
73
+        return [];
74
+    }
75 75
 
76
-	/**
77
-	 * Indicates if a valid subscription is available
78
-	 *
79
-	 * @since 17.0.0
80
-	 */
81
-	public function delegateHasValidSubscription(): bool {
82
-		// Allow overwriting this manually for environments where the subscription information cannot be fetched
83
-		if ($this->config->getSystemValueBool('has_valid_subscription')) {
84
-			return true;
85
-		}
76
+    /**
77
+     * Indicates if a valid subscription is available
78
+     *
79
+     * @since 17.0.0
80
+     */
81
+    public function delegateHasValidSubscription(): bool {
82
+        // Allow overwriting this manually for environments where the subscription information cannot be fetched
83
+        if ($this->config->getSystemValueBool('has_valid_subscription')) {
84
+            return true;
85
+        }
86 86
 
87
-		if ($this->subscription instanceof ISubscription) {
88
-			return $this->subscription->hasValidSubscription();
89
-		}
90
-		return false;
91
-	}
87
+        if ($this->subscription instanceof ISubscription) {
88
+            return $this->subscription->hasValidSubscription();
89
+        }
90
+        return false;
91
+    }
92 92
 
93
-	/**
94
-	 * Indicates if the subscription has extended support
95
-	 *
96
-	 * @since 17.0.0
97
-	 */
98
-	public function delegateHasExtendedSupport(): bool {
99
-		if ($this->subscription instanceof ISubscription && method_exists($this->subscription, 'hasExtendedSupport')) {
100
-			return $this->subscription->hasExtendedSupport();
101
-		}
102
-		return false;
103
-	}
93
+    /**
94
+     * Indicates if the subscription has extended support
95
+     *
96
+     * @since 17.0.0
97
+     */
98
+    public function delegateHasExtendedSupport(): bool {
99
+        if ($this->subscription instanceof ISubscription && method_exists($this->subscription, 'hasExtendedSupport')) {
100
+            return $this->subscription->hasExtendedSupport();
101
+        }
102
+        return false;
103
+    }
104 104
 }
Please login to merge, or discard this patch.
apps/settings/lib/Settings/Personal/ServerDevNotice.php 1 patch
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -31,39 +31,39 @@
 block discarded – undo
31 31
 
32 32
 class ServerDevNotice implements ISettings {
33 33
 
34
-	/** @var IRegistry */
35
-	private $registry;
34
+    /** @var IRegistry */
35
+    private $registry;
36 36
 
37
-	public function __construct(IRegistry $registry) {
38
-		$this->registry = $registry;
39
-	}
37
+    public function __construct(IRegistry $registry) {
38
+        $this->registry = $registry;
39
+    }
40 40
 
41
-	/**
42
-	 * @return TemplateResponse
43
-	 */
44
-	public function getForm() {
45
-		return new TemplateResponse('settings', 'settings/personal/development.notice');
46
-	}
41
+    /**
42
+     * @return TemplateResponse
43
+     */
44
+    public function getForm() {
45
+        return new TemplateResponse('settings', 'settings/personal/development.notice');
46
+    }
47 47
 
48
-	/**
49
-	 * @return string the section ID, e.g. 'sharing'
50
-	 */
51
-	public function getSection() {
52
-		if ($this->registry->delegateHasValidSubscription()) {
53
-			return null;
54
-		}
48
+    /**
49
+     * @return string the section ID, e.g. 'sharing'
50
+     */
51
+    public function getSection() {
52
+        if ($this->registry->delegateHasValidSubscription()) {
53
+            return null;
54
+        }
55 55
 
56
-		return 'personal-info';
57
-	}
56
+        return 'personal-info';
57
+    }
58 58
 
59
-	/**
60
-	 * @return int whether the form should be rather on the top or bottom of
61
-	 * the admin section. The forms are arranged in ascending order of the
62
-	 * priority values. It is required to return a value between 0 and 100.
63
-	 *
64
-	 * E.g.: 70
65
-	 */
66
-	public function getPriority() {
67
-		return 1000;
68
-	}
59
+    /**
60
+     * @return int whether the form should be rather on the top or bottom of
61
+     * the admin section. The forms are arranged in ascending order of the
62
+     * priority values. It is required to return a value between 0 and 100.
63
+     *
64
+     * E.g.: 70
65
+     */
66
+    public function getPriority() {
67
+        return 1000;
68
+    }
69 69
 }
Please login to merge, or discard this patch.