Passed
Push — master ( 4dc3f4...634f5a )
by Joas
13:36 queued 14s
created
lib/public/Notification/IAction.php 1 patch
Indentation   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -31,99 +31,99 @@
 block discarded – undo
31 31
  */
32 32
 interface IAction {
33 33
 
34
-	/**
35
-	 * @since 17.0.0
36
-	 */
37
-	public const TYPE_GET = 'GET';
38
-	/**
39
-	 * @since 17.0.0
40
-	 */
41
-	public const TYPE_POST = 'POST';
42
-	/**
43
-	 * @since 17.0.0
44
-	 */
45
-	public const TYPE_PUT = 'PUT';
46
-	/**
47
-	 * @since 17.0.0
48
-	 */
49
-	public const TYPE_DELETE = 'DELETE';
50
-	/**
51
-	 * @since 17.0.0
52
-	 */
53
-	public const TYPE_WEB = 'WEB';
34
+    /**
35
+     * @since 17.0.0
36
+     */
37
+    public const TYPE_GET = 'GET';
38
+    /**
39
+     * @since 17.0.0
40
+     */
41
+    public const TYPE_POST = 'POST';
42
+    /**
43
+     * @since 17.0.0
44
+     */
45
+    public const TYPE_PUT = 'PUT';
46
+    /**
47
+     * @since 17.0.0
48
+     */
49
+    public const TYPE_DELETE = 'DELETE';
50
+    /**
51
+     * @since 17.0.0
52
+     */
53
+    public const TYPE_WEB = 'WEB';
54 54
 
55
-	/**
56
-	 * @param string $label
57
-	 * @return $this
58
-	 * @throws \InvalidArgumentException if the label is invalid
59
-	 * @since 9.0.0
60
-	 */
61
-	public function setLabel(string $label): IAction;
55
+    /**
56
+     * @param string $label
57
+     * @return $this
58
+     * @throws \InvalidArgumentException if the label is invalid
59
+     * @since 9.0.0
60
+     */
61
+    public function setLabel(string $label): IAction;
62 62
 
63
-	/**
64
-	 * @return string
65
-	 * @since 9.0.0
66
-	 */
67
-	public function getLabel(): string;
63
+    /**
64
+     * @return string
65
+     * @since 9.0.0
66
+     */
67
+    public function getLabel(): string;
68 68
 
69
-	/**
70
-	 * @param string $label
71
-	 * @return $this
72
-	 * @throws \InvalidArgumentException if the label is invalid
73
-	 * @since 9.0.0
74
-	 */
75
-	public function setParsedLabel(string $label): IAction;
69
+    /**
70
+     * @param string $label
71
+     * @return $this
72
+     * @throws \InvalidArgumentException if the label is invalid
73
+     * @since 9.0.0
74
+     */
75
+    public function setParsedLabel(string $label): IAction;
76 76
 
77
-	/**
78
-	 * @return string
79
-	 * @since 9.0.0
80
-	 */
81
-	public function getParsedLabel(): string;
77
+    /**
78
+     * @return string
79
+     * @since 9.0.0
80
+     */
81
+    public function getParsedLabel(): string;
82 82
 
83
-	/**
84
-	 * @param bool $primary
85
-	 * @return $this
86
-	 * @throws \InvalidArgumentException if $primary is invalid
87
-	 * @since 9.0.0
88
-	 */
89
-	public function setPrimary(bool $primary): IAction;
83
+    /**
84
+     * @param bool $primary
85
+     * @return $this
86
+     * @throws \InvalidArgumentException if $primary is invalid
87
+     * @since 9.0.0
88
+     */
89
+    public function setPrimary(bool $primary): IAction;
90 90
 
91
-	/**
92
-	 * @return bool
93
-	 * @since 9.0.0
94
-	 */
95
-	public function isPrimary(): bool;
91
+    /**
92
+     * @return bool
93
+     * @since 9.0.0
94
+     */
95
+    public function isPrimary(): bool;
96 96
 
97
-	/**
98
-	 * @param string $link
99
-	 * @param string $requestType
100
-	 * @return $this
101
-	 * @throws \InvalidArgumentException if the link is invalid
102
-	 * @since 9.0.0
103
-	 */
104
-	public function setLink(string $link, string $requestType): IAction;
97
+    /**
98
+     * @param string $link
99
+     * @param string $requestType
100
+     * @return $this
101
+     * @throws \InvalidArgumentException if the link is invalid
102
+     * @since 9.0.0
103
+     */
104
+    public function setLink(string $link, string $requestType): IAction;
105 105
 
106
-	/**
107
-	 * @return string
108
-	 * @since 9.0.0
109
-	 */
110
-	public function getLink(): string;
106
+    /**
107
+     * @return string
108
+     * @since 9.0.0
109
+     */
110
+    public function getLink(): string;
111 111
 
112
-	/**
113
-	 * @return string
114
-	 * @since 9.0.0
115
-	 */
116
-	public function getRequestType(): string;
112
+    /**
113
+     * @return string
114
+     * @since 9.0.0
115
+     */
116
+    public function getRequestType(): string;
117 117
 
118
-	/**
119
-	 * @return bool
120
-	 * @since 9.0.0
121
-	 */
122
-	public function isValid(): bool;
118
+    /**
119
+     * @return bool
120
+     * @since 9.0.0
121
+     */
122
+    public function isValid(): bool;
123 123
 
124
-	/**
125
-	 * @return bool
126
-	 * @since 9.0.0
127
-	 */
128
-	public function isValidParsed(): bool;
124
+    /**
125
+     * @return bool
126
+     * @since 9.0.0
127
+     */
128
+    public function isValidParsed(): bool;
129 129
 }
Please login to merge, or discard this patch.
apps/lookup_server_connector/lib/UpdateLookupServer.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -34,51 +34,51 @@
 block discarded – undo
34 34
  * @package OCA\LookupServerConnector
35 35
  */
36 36
 class UpdateLookupServer {
37
-	/** @var IConfig */
38
-	private $config;
39
-	/** @var IJobList */
40
-	private $jobList;
37
+    /** @var IConfig */
38
+    private $config;
39
+    /** @var IJobList */
40
+    private $jobList;
41 41
 
42
-	/**
43
-	 * @param IJobList $jobList
44
-	 * @param IConfig $config
45
-	 */
46
-	public function __construct(IJobList $jobList,
47
-								IConfig $config) {
48
-		$this->config = $config;
49
-		$this->jobList = $jobList;
50
-	}
42
+    /**
43
+     * @param IJobList $jobList
44
+     * @param IConfig $config
45
+     */
46
+    public function __construct(IJobList $jobList,
47
+                                IConfig $config) {
48
+        $this->config = $config;
49
+        $this->jobList = $jobList;
50
+    }
51 51
 
52
-	/**
53
-	 * @param IUser $user
54
-	 */
55
-	public function userUpdated(IUser $user): void {
56
-		if (!$this->shouldUpdateLookupServer()) {
57
-			return;
58
-		}
52
+    /**
53
+     * @param IUser $user
54
+     */
55
+    public function userUpdated(IUser $user): void {
56
+        if (!$this->shouldUpdateLookupServer()) {
57
+            return;
58
+        }
59 59
 
60
-		// Reset retry counter
61
-		$this->config->deleteUserValue(
62
-			$user->getUID(),
63
-			'lookup_server_connector',
64
-			'update_retries'
65
-		);
66
-		$this->jobList->add(RetryJob::class, ['userId' => $user->getUID()]);
67
-	}
60
+        // Reset retry counter
61
+        $this->config->deleteUserValue(
62
+            $user->getUID(),
63
+            'lookup_server_connector',
64
+            'update_retries'
65
+        );
66
+        $this->jobList->add(RetryJob::class, ['userId' => $user->getUID()]);
67
+    }
68 68
 
69
-	/**
70
-	 * check if we should update the lookup server, we only do it if
71
-	 *
72
-	 * + we have an internet connection
73
-	 * + the lookup server update was not disabled by the admin
74
-	 * + we have a valid lookup server URL
75
-	 *
76
-	 * @return bool
77
-	 */
78
-	private function shouldUpdateLookupServer(): bool {
79
-		return $this->config->getSystemValueBool('has_internet_connection', true) === true &&
80
-			$this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') === 'yes' &&
81
-			$this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') !== '';
82
-	}
69
+    /**
70
+     * check if we should update the lookup server, we only do it if
71
+     *
72
+     * + we have an internet connection
73
+     * + the lookup server update was not disabled by the admin
74
+     * + we have a valid lookup server URL
75
+     *
76
+     * @return bool
77
+     */
78
+    private function shouldUpdateLookupServer(): bool {
79
+        return $this->config->getSystemValueBool('has_internet_connection', true) === true &&
80
+            $this->config->getAppValue('files_sharing', 'lookupServerUploadEnabled', 'yes') === 'yes' &&
81
+            $this->config->getSystemValueString('lookup_server', 'https://lookup.nextcloud.com') !== '';
82
+    }
83 83
 
84 84
 }
Please login to merge, or discard this patch.
apps/dav/lib/Exception/UnsupportedLimitOnInitialSyncException.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
  */
33 33
 class UnsupportedLimitOnInitialSyncException extends InsufficientStorage {
34 34
 
35
-	/**
36
-	 * @inheritDoc
37
-	 */
38
-	public function serialize(Server $server, \DOMElement $errorNode) {
39
-		$errorNode->appendChild($errorNode->ownerDocument->createElementNS('DAV:', 'd:number-of-matches-within-limits'));
40
-	}
35
+    /**
36
+     * @inheritDoc
37
+     */
38
+    public function serialize(Server $server, \DOMElement $errorNode) {
39
+        $errorNode->appendChild($errorNode->ownerDocument->createElementNS('DAV:', 'd:number-of-matches-within-limits'));
40
+    }
41 41
 }
Please login to merge, or discard this patch.
lib/public/AppFramework/Http/StrictContentSecurityPolicy.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -42,45 +42,45 @@
 block discarded – undo
42 42
  * @deprecated 17.0.0
43 43
  */
44 44
 class StrictContentSecurityPolicy extends EmptyContentSecurityPolicy {
45
-	/** @var bool Whether inline JS snippets are allowed */
46
-	protected $inlineScriptAllowed = false;
47
-	/** @var bool Whether eval in JS scripts is allowed */
48
-	protected $evalScriptAllowed = false;
49
-	/** @var array Domains from which scripts can get loaded */
50
-	protected $allowedScriptDomains = [
51
-		'\'self\'',
52
-	];
53
-	/** @var bool Whether inline CSS is allowed */
54
-	protected $inlineStyleAllowed = false;
55
-	/** @var array Domains from which CSS can get loaded */
56
-	protected $allowedStyleDomains = [
57
-		'\'self\'',
58
-	];
59
-	/** @var array Domains from which images can get loaded */
60
-	protected $allowedImageDomains = [
61
-		'\'self\'',
62
-		'data:',
63
-		'blob:',
64
-	];
65
-	/** @var array Domains to which connections can be done */
66
-	protected $allowedConnectDomains = [
67
-		'\'self\'',
68
-	];
69
-	/** @var array Domains from which media elements can be loaded */
70
-	protected $allowedMediaDomains = [
71
-		'\'self\'',
72
-	];
73
-	/** @var array Domains from which object elements can be loaded */
74
-	protected $allowedObjectDomains = [];
75
-	/** @var array Domains from which iframes can be loaded */
76
-	protected $allowedFrameDomains = [];
77
-	/** @var array Domains from which fonts can be loaded */
78
-	protected $allowedFontDomains = [
79
-		'\'self\'',
80
-	];
81
-	/** @var array Domains from which web-workers and nested browsing content can load elements */
82
-	protected $allowedChildSrcDomains = [];
45
+    /** @var bool Whether inline JS snippets are allowed */
46
+    protected $inlineScriptAllowed = false;
47
+    /** @var bool Whether eval in JS scripts is allowed */
48
+    protected $evalScriptAllowed = false;
49
+    /** @var array Domains from which scripts can get loaded */
50
+    protected $allowedScriptDomains = [
51
+        '\'self\'',
52
+    ];
53
+    /** @var bool Whether inline CSS is allowed */
54
+    protected $inlineStyleAllowed = false;
55
+    /** @var array Domains from which CSS can get loaded */
56
+    protected $allowedStyleDomains = [
57
+        '\'self\'',
58
+    ];
59
+    /** @var array Domains from which images can get loaded */
60
+    protected $allowedImageDomains = [
61
+        '\'self\'',
62
+        'data:',
63
+        'blob:',
64
+    ];
65
+    /** @var array Domains to which connections can be done */
66
+    protected $allowedConnectDomains = [
67
+        '\'self\'',
68
+    ];
69
+    /** @var array Domains from which media elements can be loaded */
70
+    protected $allowedMediaDomains = [
71
+        '\'self\'',
72
+    ];
73
+    /** @var array Domains from which object elements can be loaded */
74
+    protected $allowedObjectDomains = [];
75
+    /** @var array Domains from which iframes can be loaded */
76
+    protected $allowedFrameDomains = [];
77
+    /** @var array Domains from which fonts can be loaded */
78
+    protected $allowedFontDomains = [
79
+        '\'self\'',
80
+    ];
81
+    /** @var array Domains from which web-workers and nested browsing content can load elements */
82
+    protected $allowedChildSrcDomains = [];
83 83
 
84
-	/** @var array Domains which can embed this Nextcloud instance */
85
-	protected $allowedFrameAncestors = [];
84
+    /** @var array Domains which can embed this Nextcloud instance */
85
+    protected $allowedFrameAncestors = [];
86 86
 }
Please login to merge, or discard this patch.
lib/public/Calendar/Room/IRoom.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -31,50 +31,50 @@
 block discarded – undo
31 31
  */
32 32
 interface IRoom {
33 33
 
34
-	/**
35
-	 * Get a unique ID for the room
36
-	 *
37
-	 * This id has to be unique within the backend
38
-	 *
39
-	 * @return string
40
-	 * @since 14.0.0
41
-	 */
42
-	public function getId():string;
34
+    /**
35
+     * Get a unique ID for the room
36
+     *
37
+     * This id has to be unique within the backend
38
+     *
39
+     * @return string
40
+     * @since 14.0.0
41
+     */
42
+    public function getId():string;
43 43
 
44
-	/**
45
-	 * Get the display name for the room
46
-	 *
47
-	 * @return string
48
-	 * @since 14.0.0
49
-	 */
50
-	public function getDisplayName():string;
44
+    /**
45
+     * Get the display name for the room
46
+     *
47
+     * @return string
48
+     * @since 14.0.0
49
+     */
50
+    public function getDisplayName():string;
51 51
 
52
-	/**
53
-	 * Get a list of groupIds that are allowed to access this room
54
-	 *
55
-	 * If an empty array is returned, no group restrictions are
56
-	 * applied.
57
-	 *
58
-	 * @return string[]
59
-	 * @since 14.0.0
60
-	 */
61
-	public function getGroupRestrictions():array;
52
+    /**
53
+     * Get a list of groupIds that are allowed to access this room
54
+     *
55
+     * If an empty array is returned, no group restrictions are
56
+     * applied.
57
+     *
58
+     * @return string[]
59
+     * @since 14.0.0
60
+     */
61
+    public function getGroupRestrictions():array;
62 62
 
63
-	/**
64
-	 * Get the email-address for the room
65
-	 *
66
-	 * The email-address has to be globally unique
67
-	 *
68
-	 * @return string
69
-	 * @since 14.0.0
70
-	 */
71
-	public function getEMail():string;
63
+    /**
64
+     * Get the email-address for the room
65
+     *
66
+     * The email-address has to be globally unique
67
+     *
68
+     * @return string
69
+     * @since 14.0.0
70
+     */
71
+    public function getEMail():string;
72 72
 
73
-	/**
74
-	 * Get corresponding backend object
75
-	 *
76
-	 * @return IBackend
77
-	 * @since 14.0.0
78
-	 */
79
-	public function getBackend():IBackend;
73
+    /**
74
+     * Get corresponding backend object
75
+     *
76
+     * @return IBackend
77
+     * @since 14.0.0
78
+     */
79
+    public function getBackend():IBackend;
80 80
 }
Please login to merge, or discard this patch.
lib/public/Calendar/Resource/IResourceMetadata.php 1 patch
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -35,84 +35,84 @@
 block discarded – undo
35 35
  */
36 36
 interface IResourceMetadata {
37 37
 
38
-	/**
39
-	 * Type of resource
40
-	 *
41
-	 * Allowed values for this key include:
42
-	 * - projector
43
-	 * - tv
44
-	 * - vehicle
45
-	 * - other
46
-	 *
47
-	 * @since 17.0.0
48
-	 */
49
-	public const RESOURCE_TYPE = '{http://nextcloud.com/ns}resource-type';
38
+    /**
39
+     * Type of resource
40
+     *
41
+     * Allowed values for this key include:
42
+     * - projector
43
+     * - tv
44
+     * - vehicle
45
+     * - other
46
+     *
47
+     * @since 17.0.0
48
+     */
49
+    public const RESOURCE_TYPE = '{http://nextcloud.com/ns}resource-type';
50 50
 
51
-	/**
52
-	 * If resource is of type vehicle, this describes the type of vehicle
53
-	 *
54
-	 * Allowed values:
55
-	 * - bicycle
56
-	 * - scooter
57
-	 * - motorbike
58
-	 * - car
59
-	 * - plane
60
-	 * - helicopter
61
-	 * - other
62
-	 *
63
-	 * @since 17.0.0
64
-	 */
65
-	public const VEHICLE_TYPE = '{http://nextcloud.com/ns}resource-vehicle-type';
51
+    /**
52
+     * If resource is of type vehicle, this describes the type of vehicle
53
+     *
54
+     * Allowed values:
55
+     * - bicycle
56
+     * - scooter
57
+     * - motorbike
58
+     * - car
59
+     * - plane
60
+     * - helicopter
61
+     * - other
62
+     *
63
+     * @since 17.0.0
64
+     */
65
+    public const VEHICLE_TYPE = '{http://nextcloud.com/ns}resource-vehicle-type';
66 66
 
67
-	/**
68
-	 * Make of the vehicle
69
-	 *
70
-	 * @since 17.0.0
71
-	 */
72
-	public const VEHICLE_MAKE = '{http://nextcloud.com/ns}resource-vehicle-make';
67
+    /**
68
+     * Make of the vehicle
69
+     *
70
+     * @since 17.0.0
71
+     */
72
+    public const VEHICLE_MAKE = '{http://nextcloud.com/ns}resource-vehicle-make';
73 73
 
74
-	/**
75
-	 * Model of the vehicle
76
-	 *
77
-	 * @since 17.0.0
78
-	 */
79
-	public const VEHICLE_MODEL = '{http://nextcloud.com/ns}resource-vehicle-model';
74
+    /**
75
+     * Model of the vehicle
76
+     *
77
+     * @since 17.0.0
78
+     */
79
+    public const VEHICLE_MODEL = '{http://nextcloud.com/ns}resource-vehicle-model';
80 80
 
81
-	/**
82
-	 * Whether or not the car is electric
83
-	 *
84
-	 * use '1' for electric, '0' for non-electric
85
-	 *
86
-	 * @since 17.0.0
87
-	 */
88
-	public const VEHICLE_IS_ELECTRIC = '{http://nextcloud.com/ns}resource-vehicle-is-electric';
81
+    /**
82
+     * Whether or not the car is electric
83
+     *
84
+     * use '1' for electric, '0' for non-electric
85
+     *
86
+     * @since 17.0.0
87
+     */
88
+    public const VEHICLE_IS_ELECTRIC = '{http://nextcloud.com/ns}resource-vehicle-is-electric';
89 89
 
90
-	/**
91
-	 * Range of vehicle with a full tank
92
-	 *
93
-	 * @since 17.0.0
94
-	 */
95
-	public const VEHICLE_RANGE = '{http://nextcloud.com/ns}resource-vehicle-range';
90
+    /**
91
+     * Range of vehicle with a full tank
92
+     *
93
+     * @since 17.0.0
94
+     */
95
+    public const VEHICLE_RANGE = '{http://nextcloud.com/ns}resource-vehicle-range';
96 96
 
97
-	/**
98
-	 * Seating capacity of the vehicle
99
-	 *
100
-	 * @since 17.0.0
101
-	 */
102
-	public const VEHICLE_SEATING_CAPACITY = '{http://nextcloud.com/ns}resource-vehicle-seating-capacity';
97
+    /**
98
+     * Seating capacity of the vehicle
99
+     *
100
+     * @since 17.0.0
101
+     */
102
+    public const VEHICLE_SEATING_CAPACITY = '{http://nextcloud.com/ns}resource-vehicle-seating-capacity';
103 103
 
104
-	/**
105
-	 * Contact information about the person who is responsible to administer / maintain this resource
106
-	 * This key stores a textual description of name and possible ways to contact the person
107
-	 *
108
-	 * @since 17.0.0
109
-	 */
110
-	public const CONTACT_PERSON = '{http://nextcloud.com/ns}resource-contact-person';
104
+    /**
105
+     * Contact information about the person who is responsible to administer / maintain this resource
106
+     * This key stores a textual description of name and possible ways to contact the person
107
+     *
108
+     * @since 17.0.0
109
+     */
110
+    public const CONTACT_PERSON = '{http://nextcloud.com/ns}resource-contact-person';
111 111
 
112
-	/**
113
-	 * Link to the vcard of the contact person
114
-	 *
115
-	 * @since 17.0.0
116
-	 */
117
-	public const CONTACT_PERSON_VCARD = '{http://nextcloud.com/ns}resource-contact-person-vcard';
112
+    /**
113
+     * Link to the vcard of the contact person
114
+     *
115
+     * @since 17.0.0
116
+     */
117
+    public const CONTACT_PERSON_VCARD = '{http://nextcloud.com/ns}resource-contact-person-vcard';
118 118
 }
Please login to merge, or discard this patch.
lib/public/Calendar/IMetadataProvider.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -33,33 +33,33 @@
 block discarded – undo
33 33
  */
34 34
 interface IMetadataProvider {
35 35
 
36
-	/**
37
-	 * Get a list of all metadata keys available for this room
38
-	 *
39
-	 * Room backends are allowed to return custom keys, beyond the ones
40
-	 * defined in this class. If they do, they should make sure to use their
41
-	 * own namespace.
42
-	 *
43
-	 * @return String[] - A list of available keys
44
-	 * @since 17.0.0
45
-	 */
46
-	public function getAllAvailableMetadataKeys():array;
36
+    /**
37
+     * Get a list of all metadata keys available for this room
38
+     *
39
+     * Room backends are allowed to return custom keys, beyond the ones
40
+     * defined in this class. If they do, they should make sure to use their
41
+     * own namespace.
42
+     *
43
+     * @return String[] - A list of available keys
44
+     * @since 17.0.0
45
+     */
46
+    public function getAllAvailableMetadataKeys():array;
47 47
 
48
-	/**
49
-	 * Get whether or not a metadata key is set for this room
50
-	 *
51
-	 * @param string $key - The key to check for
52
-	 * @return bool - Whether or not key is available
53
-	 * @since 17.0.0
54
-	 */
55
-	public function hasMetadataForKey(string $key):bool;
48
+    /**
49
+     * Get whether or not a metadata key is set for this room
50
+     *
51
+     * @param string $key - The key to check for
52
+     * @return bool - Whether or not key is available
53
+     * @since 17.0.0
54
+     */
55
+    public function hasMetadataForKey(string $key):bool;
56 56
 
57
-	/**
58
-	 * Get the value for a metadata key
59
-	 *
60
-	 * @param string $key - The key to check for
61
-	 * @return string|null - The value stored for the key, null if no value stored
62
-	 * @since 17.0.0
63
-	 */
64
-	public function getMetadataForKey(string $key):?string;
57
+    /**
58
+     * Get the value for a metadata key
59
+     *
60
+     * @param string $key - The key to check for
61
+     * @return string|null - The value stored for the key, null if no value stored
62
+     * @since 17.0.0
63
+     */
64
+    public function getMetadataForKey(string $key):?string;
65 65
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,5 +61,5 @@
 block discarded – undo
61 61
 	 * @return string|null - The value stored for the key, null if no value stored
62 62
 	 * @since 17.0.0
63 63
 	 */
64
-	public function getMetadataForKey(string $key):?string;
64
+	public function getMetadataForKey(string $key): ?string;
65 65
 }
Please login to merge, or discard this patch.
lib/private/AppFramework/Middleware/Security/FeaturePolicyMiddleware.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -38,33 +38,33 @@
 block discarded – undo
38 38
 
39 39
 class FeaturePolicyMiddleware extends Middleware {
40 40
 
41
-	/** @var FeaturePolicyManager */
42
-	private $policyManager;
41
+    /** @var FeaturePolicyManager */
42
+    private $policyManager;
43 43
 
44
-	public function __construct(FeaturePolicyManager $policyManager) {
45
-		$this->policyManager = $policyManager;
46
-	}
44
+    public function __construct(FeaturePolicyManager $policyManager) {
45
+        $this->policyManager = $policyManager;
46
+    }
47 47
 
48
-	/**
49
-	 * Performs the default FeaturePolicy modifications that may be injected by other
50
-	 * applications
51
-	 *
52
-	 * @param Controller $controller
53
-	 * @param string $methodName
54
-	 * @param Response $response
55
-	 * @return Response
56
-	 */
57
-	public function afterController($controller, $methodName, Response $response): Response {
58
-		$policy = !is_null($response->getFeaturePolicy()) ? $response->getFeaturePolicy() : new FeaturePolicy();
48
+    /**
49
+     * Performs the default FeaturePolicy modifications that may be injected by other
50
+     * applications
51
+     *
52
+     * @param Controller $controller
53
+     * @param string $methodName
54
+     * @param Response $response
55
+     * @return Response
56
+     */
57
+    public function afterController($controller, $methodName, Response $response): Response {
58
+        $policy = !is_null($response->getFeaturePolicy()) ? $response->getFeaturePolicy() : new FeaturePolicy();
59 59
 
60
-		if (get_class($policy) === EmptyFeaturePolicy::class) {
61
-			return $response;
62
-		}
60
+        if (get_class($policy) === EmptyFeaturePolicy::class) {
61
+            return $response;
62
+        }
63 63
 
64
-		$defaultPolicy = $this->policyManager->getDefaultPolicy();
65
-		$defaultPolicy = $this->policyManager->mergePolicies($defaultPolicy, $policy);
66
-		$response->setFeaturePolicy($defaultPolicy);
64
+        $defaultPolicy = $this->policyManager->getDefaultPolicy();
65
+        $defaultPolicy = $this->policyManager->mergePolicies($defaultPolicy, $policy);
66
+        $response->setFeaturePolicy($defaultPolicy);
67 67
 
68
-		return $response;
69
-	}
68
+        return $response;
69
+    }
70 70
 }
Please login to merge, or discard this patch.
lib/private/Security/FeaturePolicy/FeaturePolicyManager.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,10 +60,10 @@
 block discarded – undo
60 60
 	 */
61 61
 	public function mergePolicies(FeaturePolicy $defaultPolicy,
62 62
 								  EmptyFeaturePolicy $originalPolicy): FeaturePolicy {
63
-		foreach ((object)(array)$originalPolicy as $name => $value) {
64
-			$setter = 'set' . ucfirst($name);
63
+		foreach ((object) (array) $originalPolicy as $name => $value) {
64
+			$setter = 'set'.ucfirst($name);
65 65
 			if (\is_array($value)) {
66
-				$getter = 'get' . ucfirst($name);
66
+				$getter = 'get'.ucfirst($name);
67 67
 				$currentValues = \is_array($defaultPolicy->$getter()) ? $defaultPolicy->$getter() : [];
68 68
 				$defaultPolicy->$setter(\array_values(\array_unique(\array_merge($currentValues, $value))));
69 69
 			} elseif (\is_bool($value)) {
Please login to merge, or discard this patch.
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -31,48 +31,48 @@
 block discarded – undo
31 31
 use OCP\Security\FeaturePolicy\AddFeaturePolicyEvent;
32 32
 
33 33
 class FeaturePolicyManager {
34
-	/** @var EmptyFeaturePolicy[] */
35
-	private $policies = [];
34
+    /** @var EmptyFeaturePolicy[] */
35
+    private $policies = [];
36 36
 
37
-	/** @var IEventDispatcher */
38
-	private $dispatcher;
37
+    /** @var IEventDispatcher */
38
+    private $dispatcher;
39 39
 
40
-	public function __construct(IEventDispatcher $dispatcher) {
41
-		$this->dispatcher = $dispatcher;
42
-	}
40
+    public function __construct(IEventDispatcher $dispatcher) {
41
+        $this->dispatcher = $dispatcher;
42
+    }
43 43
 
44
-	public function addDefaultPolicy(EmptyFeaturePolicy $policy): void {
45
-		$this->policies[] = $policy;
46
-	}
44
+    public function addDefaultPolicy(EmptyFeaturePolicy $policy): void {
45
+        $this->policies[] = $policy;
46
+    }
47 47
 
48
-	public function getDefaultPolicy(): FeaturePolicy {
49
-		$event = new AddFeaturePolicyEvent($this);
50
-		$this->dispatcher->dispatchTyped($event);
48
+    public function getDefaultPolicy(): FeaturePolicy {
49
+        $event = new AddFeaturePolicyEvent($this);
50
+        $this->dispatcher->dispatchTyped($event);
51 51
 
52
-		$defaultPolicy = new FeaturePolicy();
53
-		foreach ($this->policies as $policy) {
54
-			$defaultPolicy = $this->mergePolicies($defaultPolicy, $policy);
55
-		}
56
-		return $defaultPolicy;
57
-	}
52
+        $defaultPolicy = new FeaturePolicy();
53
+        foreach ($this->policies as $policy) {
54
+            $defaultPolicy = $this->mergePolicies($defaultPolicy, $policy);
55
+        }
56
+        return $defaultPolicy;
57
+    }
58 58
 
59
-	/**
60
-	 * Merges the first given policy with the second one
61
-	 *
62
-	 */
63
-	public function mergePolicies(FeaturePolicy $defaultPolicy,
64
-								  EmptyFeaturePolicy $originalPolicy): FeaturePolicy {
65
-		foreach ((object)(array)$originalPolicy as $name => $value) {
66
-			$setter = 'set' . ucfirst($name);
67
-			if (\is_array($value)) {
68
-				$getter = 'get' . ucfirst($name);
69
-				$currentValues = \is_array($defaultPolicy->$getter()) ? $defaultPolicy->$getter() : [];
70
-				$defaultPolicy->$setter(\array_values(\array_unique(\array_merge($currentValues, $value))));
71
-			} elseif (\is_bool($value)) {
72
-				$defaultPolicy->$setter($value);
73
-			}
74
-		}
59
+    /**
60
+     * Merges the first given policy with the second one
61
+     *
62
+     */
63
+    public function mergePolicies(FeaturePolicy $defaultPolicy,
64
+                                    EmptyFeaturePolicy $originalPolicy): FeaturePolicy {
65
+        foreach ((object)(array)$originalPolicy as $name => $value) {
66
+            $setter = 'set' . ucfirst($name);
67
+            if (\is_array($value)) {
68
+                $getter = 'get' . ucfirst($name);
69
+                $currentValues = \is_array($defaultPolicy->$getter()) ? $defaultPolicy->$getter() : [];
70
+                $defaultPolicy->$setter(\array_values(\array_unique(\array_merge($currentValues, $value))));
71
+            } elseif (\is_bool($value)) {
72
+                $defaultPolicy->$setter($value);
73
+            }
74
+        }
75 75
 
76
-		return $defaultPolicy;
77
-	}
76
+        return $defaultPolicy;
77
+    }
78 78
 }
Please login to merge, or discard this patch.