Passed
Push — master ( 5a0b28...e11c5f )
by Joas
14:35 queued 12s
created
lib/private/Authentication/Token/PublicKeyToken.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
 		if (is_array($scope)) {
185 185
 			parent::setScope(json_encode($scope));
186 186
 		} else {
187
-			parent::setScope((string)$scope);
187
+			parent::setScope((string) $scope);
188 188
 		}
189 189
 	}
190 190
 
Please login to merge, or discard this patch.
Indentation   +184 added lines, -184 removed lines patch added patch discarded remove patch
@@ -47,188 +47,188 @@
 block discarded – undo
47 47
  * @method bool getPasswordInvalid()
48 48
  */
49 49
 class PublicKeyToken extends Entity implements INamedToken, IWipeableToken {
50
-	public const VERSION = 2;
51
-
52
-	/** @var string user UID */
53
-	protected $uid;
54
-
55
-	/** @var string login name used for generating the token */
56
-	protected $loginName;
57
-
58
-	/** @var string encrypted user password */
59
-	protected $password;
60
-
61
-	/** @var string token name (e.g. browser/OS) */
62
-	protected $name;
63
-
64
-	/** @var string */
65
-	protected $token;
66
-
67
-	/** @var int */
68
-	protected $type;
69
-
70
-	/** @var int */
71
-	protected $remember;
72
-
73
-	/** @var int */
74
-	protected $lastActivity;
75
-
76
-	/** @var int */
77
-	protected $lastCheck;
78
-
79
-	/** @var string */
80
-	protected $scope;
81
-
82
-	/** @var int */
83
-	protected $expires;
84
-
85
-	/** @var string */
86
-	protected $privateKey;
87
-
88
-	/** @var string */
89
-	protected $publicKey;
90
-
91
-	/** @var int */
92
-	protected $version;
93
-
94
-	/** @var bool */
95
-	protected $passwordInvalid;
96
-
97
-	public function __construct() {
98
-		$this->addType('uid', 'string');
99
-		$this->addType('loginName', 'string');
100
-		$this->addType('password', 'string');
101
-		$this->addType('name', 'string');
102
-		$this->addType('token', 'string');
103
-		$this->addType('type', 'int');
104
-		$this->addType('remember', 'int');
105
-		$this->addType('lastActivity', 'int');
106
-		$this->addType('lastCheck', 'int');
107
-		$this->addType('scope', 'string');
108
-		$this->addType('expires', 'int');
109
-		$this->addType('publicKey', 'string');
110
-		$this->addType('privateKey', 'string');
111
-		$this->addType('version', 'int');
112
-		$this->addType('passwordInvalid', 'bool');
113
-	}
114
-
115
-	public function getId(): int {
116
-		return $this->id;
117
-	}
118
-
119
-	public function getUID(): string {
120
-		return $this->uid;
121
-	}
122
-
123
-	/**
124
-	 * Get the login name used when generating the token
125
-	 *
126
-	 * @return string
127
-	 */
128
-	public function getLoginName(): string {
129
-		return parent::getLoginName();
130
-	}
131
-
132
-	/**
133
-	 * Get the (encrypted) login password
134
-	 *
135
-	 * @return string|null
136
-	 */
137
-	public function getPassword() {
138
-		return parent::getPassword();
139
-	}
140
-
141
-	public function jsonSerialize(): array {
142
-		return [
143
-			'id' => $this->id,
144
-			'name' => $this->name,
145
-			'lastActivity' => $this->lastActivity,
146
-			'type' => $this->type,
147
-			'scope' => $this->getScopeAsArray()
148
-		];
149
-	}
150
-
151
-	/**
152
-	 * Get the timestamp of the last password check
153
-	 *
154
-	 * @return int
155
-	 */
156
-	public function getLastCheck(): int {
157
-		return parent::getLastCheck();
158
-	}
159
-
160
-	/**
161
-	 * Get the timestamp of the last password check
162
-	 *
163
-	 * @param int $time
164
-	 */
165
-	public function setLastCheck(int $time) {
166
-		parent::setLastCheck($time);
167
-	}
168
-
169
-	public function getScope(): string {
170
-		$scope = parent::getScope();
171
-		if ($scope === null) {
172
-			return '';
173
-		}
174
-
175
-		return $scope;
176
-	}
177
-
178
-	public function getScopeAsArray(): array {
179
-		$scope = json_decode($this->getScope(), true);
180
-		if (!$scope) {
181
-			return [
182
-				'filesystem' => true
183
-			];
184
-		}
185
-		return $scope;
186
-	}
187
-
188
-	public function setScope($scope) {
189
-		if (is_array($scope)) {
190
-			parent::setScope(json_encode($scope));
191
-		} else {
192
-			parent::setScope((string)$scope);
193
-		}
194
-	}
195
-
196
-	public function getName(): string {
197
-		return parent::getName();
198
-	}
199
-
200
-	public function setName(string $name): void {
201
-		parent::setName($name);
202
-	}
203
-
204
-	public function getRemember(): int {
205
-		return parent::getRemember();
206
-	}
207
-
208
-	public function setToken(string $token) {
209
-		parent::setToken($token);
210
-	}
211
-
212
-	public function setPassword(string $password = null) {
213
-		parent::setPassword($password);
214
-	}
215
-
216
-	public function setExpires($expires) {
217
-		parent::setExpires($expires);
218
-	}
219
-
220
-	/**
221
-	 * @return int|null
222
-	 */
223
-	public function getExpires() {
224
-		return parent::getExpires();
225
-	}
226
-
227
-	public function setPasswordInvalid(bool $invalid) {
228
-		parent::setPasswordInvalid($invalid);
229
-	}
230
-
231
-	public function wipe(): void {
232
-		parent::setType(IToken::WIPE_TOKEN);
233
-	}
50
+    public const VERSION = 2;
51
+
52
+    /** @var string user UID */
53
+    protected $uid;
54
+
55
+    /** @var string login name used for generating the token */
56
+    protected $loginName;
57
+
58
+    /** @var string encrypted user password */
59
+    protected $password;
60
+
61
+    /** @var string token name (e.g. browser/OS) */
62
+    protected $name;
63
+
64
+    /** @var string */
65
+    protected $token;
66
+
67
+    /** @var int */
68
+    protected $type;
69
+
70
+    /** @var int */
71
+    protected $remember;
72
+
73
+    /** @var int */
74
+    protected $lastActivity;
75
+
76
+    /** @var int */
77
+    protected $lastCheck;
78
+
79
+    /** @var string */
80
+    protected $scope;
81
+
82
+    /** @var int */
83
+    protected $expires;
84
+
85
+    /** @var string */
86
+    protected $privateKey;
87
+
88
+    /** @var string */
89
+    protected $publicKey;
90
+
91
+    /** @var int */
92
+    protected $version;
93
+
94
+    /** @var bool */
95
+    protected $passwordInvalid;
96
+
97
+    public function __construct() {
98
+        $this->addType('uid', 'string');
99
+        $this->addType('loginName', 'string');
100
+        $this->addType('password', 'string');
101
+        $this->addType('name', 'string');
102
+        $this->addType('token', 'string');
103
+        $this->addType('type', 'int');
104
+        $this->addType('remember', 'int');
105
+        $this->addType('lastActivity', 'int');
106
+        $this->addType('lastCheck', 'int');
107
+        $this->addType('scope', 'string');
108
+        $this->addType('expires', 'int');
109
+        $this->addType('publicKey', 'string');
110
+        $this->addType('privateKey', 'string');
111
+        $this->addType('version', 'int');
112
+        $this->addType('passwordInvalid', 'bool');
113
+    }
114
+
115
+    public function getId(): int {
116
+        return $this->id;
117
+    }
118
+
119
+    public function getUID(): string {
120
+        return $this->uid;
121
+    }
122
+
123
+    /**
124
+     * Get the login name used when generating the token
125
+     *
126
+     * @return string
127
+     */
128
+    public function getLoginName(): string {
129
+        return parent::getLoginName();
130
+    }
131
+
132
+    /**
133
+     * Get the (encrypted) login password
134
+     *
135
+     * @return string|null
136
+     */
137
+    public function getPassword() {
138
+        return parent::getPassword();
139
+    }
140
+
141
+    public function jsonSerialize(): array {
142
+        return [
143
+            'id' => $this->id,
144
+            'name' => $this->name,
145
+            'lastActivity' => $this->lastActivity,
146
+            'type' => $this->type,
147
+            'scope' => $this->getScopeAsArray()
148
+        ];
149
+    }
150
+
151
+    /**
152
+     * Get the timestamp of the last password check
153
+     *
154
+     * @return int
155
+     */
156
+    public function getLastCheck(): int {
157
+        return parent::getLastCheck();
158
+    }
159
+
160
+    /**
161
+     * Get the timestamp of the last password check
162
+     *
163
+     * @param int $time
164
+     */
165
+    public function setLastCheck(int $time) {
166
+        parent::setLastCheck($time);
167
+    }
168
+
169
+    public function getScope(): string {
170
+        $scope = parent::getScope();
171
+        if ($scope === null) {
172
+            return '';
173
+        }
174
+
175
+        return $scope;
176
+    }
177
+
178
+    public function getScopeAsArray(): array {
179
+        $scope = json_decode($this->getScope(), true);
180
+        if (!$scope) {
181
+            return [
182
+                'filesystem' => true
183
+            ];
184
+        }
185
+        return $scope;
186
+    }
187
+
188
+    public function setScope($scope) {
189
+        if (is_array($scope)) {
190
+            parent::setScope(json_encode($scope));
191
+        } else {
192
+            parent::setScope((string)$scope);
193
+        }
194
+    }
195
+
196
+    public function getName(): string {
197
+        return parent::getName();
198
+    }
199
+
200
+    public function setName(string $name): void {
201
+        parent::setName($name);
202
+    }
203
+
204
+    public function getRemember(): int {
205
+        return parent::getRemember();
206
+    }
207
+
208
+    public function setToken(string $token) {
209
+        parent::setToken($token);
210
+    }
211
+
212
+    public function setPassword(string $password = null) {
213
+        parent::setPassword($password);
214
+    }
215
+
216
+    public function setExpires($expires) {
217
+        parent::setExpires($expires);
218
+    }
219
+
220
+    /**
221
+     * @return int|null
222
+     */
223
+    public function getExpires() {
224
+        return parent::getExpires();
225
+    }
226
+
227
+    public function setPasswordInvalid(bool $invalid) {
228
+        parent::setPasswordInvalid($invalid);
229
+    }
230
+
231
+    public function wipe(): void {
232
+        parent::setType(IToken::WIPE_TOKEN);
233
+    }
234 234
 }
Please login to merge, or discard this patch.
lib/public/Calendar/Resource/IResource.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 IResource {
33 33
 
34
-	/**
35
-	 * get the resource id
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 the resource id
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 a resource
46
-	 *
47
-	 * @return string
48
-	 * @since 14.0.0
49
-	 */
50
-	public function getDisplayName():string;
44
+    /**
45
+     * get the display name for a resource
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 resource
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 resource
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 email-address for resource
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 email-address for resource
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/IBackend.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -32,39 +32,39 @@
 block discarded – undo
32 32
  */
33 33
 interface IBackend {
34 34
 
35
-	/**
36
-	 * get a list of all resources in this backend
37
-	 *
38
-	 * @throws BackendTemporarilyUnavailableException
39
-	 * @return IResource[]
40
-	 * @since 14.0.0
41
-	 */
42
-	public function getAllResources():array;
35
+    /**
36
+     * get a list of all resources in this backend
37
+     *
38
+     * @throws BackendTemporarilyUnavailableException
39
+     * @return IResource[]
40
+     * @since 14.0.0
41
+     */
42
+    public function getAllResources():array;
43 43
 
44
-	/**
45
-	 * get a list of all resource identifiers in this backend
46
-	 *
47
-	 * @throws BackendTemporarilyUnavailableException
48
-	 * @return string[]
49
-	 * @since 14.0.0
50
-	 */
51
-	public function listAllResources():array;
44
+    /**
45
+     * get a list of all resource identifiers in this backend
46
+     *
47
+     * @throws BackendTemporarilyUnavailableException
48
+     * @return string[]
49
+     * @since 14.0.0
50
+     */
51
+    public function listAllResources():array;
52 52
 
53
-	/**
54
-	 * get a resource by it's id
55
-	 *
56
-	 * @param string $id
57
-	 * @throws BackendTemporarilyUnavailableException
58
-	 * @return IResource|null
59
-	 * @since 14.0.0
60
-	 */
61
-	public function getResource($id);
53
+    /**
54
+     * get a resource by it's id
55
+     *
56
+     * @param string $id
57
+     * @throws BackendTemporarilyUnavailableException
58
+     * @return IResource|null
59
+     * @since 14.0.0
60
+     */
61
+    public function getResource($id);
62 62
 
63
-	/**
64
-	 * Get unique identifier of the backend
65
-	 *
66
-	 * @return string
67
-	 * @since 14.0.0
68
-	 */
69
-	public function getBackendIdentifier():string;
63
+    /**
64
+     * Get unique identifier of the backend
65
+     *
66
+     * @return string
67
+     * @since 14.0.0
68
+     */
69
+    public function getBackendIdentifier():string;
70 70
 }
Please login to merge, or discard this patch.
lib/public/Calendar/Room/IBackend.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -32,39 +32,39 @@
 block discarded – undo
32 32
  */
33 33
 interface IBackend {
34 34
 
35
-	/**
36
-	 * get a list of all rooms in this backend
37
-	 *
38
-	 * @throws BackendTemporarilyUnavailableException
39
-	 * @return IRoom[]
40
-	 * @since 14.0.0
41
-	 */
42
-	public function getAllRooms():array;
35
+    /**
36
+     * get a list of all rooms in this backend
37
+     *
38
+     * @throws BackendTemporarilyUnavailableException
39
+     * @return IRoom[]
40
+     * @since 14.0.0
41
+     */
42
+    public function getAllRooms():array;
43 43
 
44
-	/**
45
-	 * get a list of all room identifiers in this backend
46
-	 *
47
-	 * @throws BackendTemporarilyUnavailableException
48
-	 * @return string[]
49
-	 * @since 14.0.0
50
-	 */
51
-	public function listAllRooms():array;
44
+    /**
45
+     * get a list of all room identifiers in this backend
46
+     *
47
+     * @throws BackendTemporarilyUnavailableException
48
+     * @return string[]
49
+     * @since 14.0.0
50
+     */
51
+    public function listAllRooms():array;
52 52
 
53
-	/**
54
-	 * get a room by it's id
55
-	 *
56
-	 * @param string $id
57
-	 * @throws BackendTemporarilyUnavailableException
58
-	 * @return IRoom|null
59
-	 * @since 14.0.0
60
-	 */
61
-	public function getRoom($id);
53
+    /**
54
+     * get a room by it's id
55
+     *
56
+     * @param string $id
57
+     * @throws BackendTemporarilyUnavailableException
58
+     * @return IRoom|null
59
+     * @since 14.0.0
60
+     */
61
+    public function getRoom($id);
62 62
 
63
-	/**
64
-	 * Get unique identifier of the backend
65
-	 *
66
-	 * @return string
67
-	 * @since 14.0.0
68
-	 */
69
-	public function getBackendIdentifier():string;
63
+    /**
64
+     * Get unique identifier of the backend
65
+     *
66
+     * @return string
67
+     * @since 14.0.0
68
+     */
69
+    public function getBackendIdentifier():string;
70 70
 }
Please login to merge, or discard this patch.
lib/public/Federation/ICloudFederationProvider.php 1 patch
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -39,51 +39,51 @@
 block discarded – undo
39 39
 
40 40
 interface ICloudFederationProvider {
41 41
 
42
-	/**
43
-	 * get the name of the share type, handled by this provider
44
-	 *
45
-	 * @return string
46
-	 *
47
-	 * @since 14.0.0
48
-	 */
49
-	public function getShareType();
42
+    /**
43
+     * get the name of the share type, handled by this provider
44
+     *
45
+     * @return string
46
+     *
47
+     * @since 14.0.0
48
+     */
49
+    public function getShareType();
50 50
 
51
-	/**
52
-	 * share received from another server
53
-	 *
54
-	 * @param ICloudFederationShare $share
55
-	 * @return string provider specific unique ID of the share
56
-	 *
57
-	 * @throws ProviderCouldNotAddShareException
58
-	 *
59
-	 * @since 14.0.0
60
-	 */
61
-	public function shareReceived(ICloudFederationShare $share);
51
+    /**
52
+     * share received from another server
53
+     *
54
+     * @param ICloudFederationShare $share
55
+     * @return string provider specific unique ID of the share
56
+     *
57
+     * @throws ProviderCouldNotAddShareException
58
+     *
59
+     * @since 14.0.0
60
+     */
61
+    public function shareReceived(ICloudFederationShare $share);
62 62
 
63
-	/**
64
-	 * notification received from another server
65
-	 *
66
-	 * @param string $notificationType (e.g SHARE_ACCEPTED)
67
-	 * @param string $providerId share ID
68
-	 * @param array $notification provider specific notification
69
-	 * @return array $data send back to sender
70
-	 *
71
-	 * @throws ShareNotFound
72
-	 * @throws ActionNotSupportedException
73
-	 * @throws BadRequestException
74
-	 * @throws AuthenticationFailedException
75
-	 *
76
-	 * @since 14.0.0
77
-	 */
78
-	public function notificationReceived($notificationType, $providerId, array $notification);
63
+    /**
64
+     * notification received from another server
65
+     *
66
+     * @param string $notificationType (e.g SHARE_ACCEPTED)
67
+     * @param string $providerId share ID
68
+     * @param array $notification provider specific notification
69
+     * @return array $data send back to sender
70
+     *
71
+     * @throws ShareNotFound
72
+     * @throws ActionNotSupportedException
73
+     * @throws BadRequestException
74
+     * @throws AuthenticationFailedException
75
+     *
76
+     * @since 14.0.0
77
+     */
78
+    public function notificationReceived($notificationType, $providerId, array $notification);
79 79
 
80
-	/**
81
-	 * get the supported share types, e.g. "user", "group", etc.
82
-	 *
83
-	 * @return array
84
-	 *
85
-	 * @since 14.0.0
86
-	 */
87
-	public function getSupportedShareTypes();
80
+    /**
81
+     * get the supported share types, e.g. "user", "group", etc.
82
+     *
83
+     * @return array
84
+     *
85
+     * @since 14.0.0
86
+     */
87
+    public function getSupportedShareTypes();
88 88
 
89 89
 }
Please login to merge, or discard this patch.
apps/dav/templates/schedule-response-success.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1 1
 <div class="update" style="justify-content: space-around; display: flex;">
2 2
 	<span class="icon icon-checkmark-white"></span>
3
-	<p class="message"><?php p($l->t('Your attendance was updated successfully.'));?></p>
3
+	<p class="message"><?php p($l->t('Your attendance was updated successfully.')); ?></p>
4 4
 </div>
Please login to merge, or discard this patch.
lib/public/IL10N.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 	 * @return string language
108 108
 	 * @since 7.0.0
109 109
 	 */
110
-	public function getLanguageCode(): string ;
110
+	public function getLanguageCode(): string;
111 111
 
112 112
 	/**
113 113
 	 * * The code (en_US, fr_CA, ...) of the locale that is used for this IL10N object
Please login to merge, or discard this patch.
Indentation   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -43,77 +43,77 @@
 block discarded – undo
43 43
  * @since 6.0.0
44 44
  */
45 45
 interface IL10N {
46
-	/**
47
-	 * Translating
48
-	 * @param string $text The text we need a translation for
49
-	 * @param array|string $parameters default:array() Parameters for sprintf
50
-	 * @return string Translation or the same text
51
-	 *
52
-	 * Returns the translation. If no translation is found, $text will be
53
-	 * returned.
54
-	 * @since 6.0.0
55
-	 */
56
-	public function t(string $text, $parameters = []): string;
46
+    /**
47
+     * Translating
48
+     * @param string $text The text we need a translation for
49
+     * @param array|string $parameters default:array() Parameters for sprintf
50
+     * @return string Translation or the same text
51
+     *
52
+     * Returns the translation. If no translation is found, $text will be
53
+     * returned.
54
+     * @since 6.0.0
55
+     */
56
+    public function t(string $text, $parameters = []): string;
57 57
 
58
-	/**
59
-	 * Translating
60
-	 * @param string $text_singular the string to translate for exactly one object
61
-	 * @param string $text_plural the string to translate for n objects
62
-	 * @param integer $count Number of objects
63
-	 * @param array $parameters default:array() Parameters for sprintf
64
-	 * @return string Translation or the same text
65
-	 *
66
-	 * Returns the translation. If no translation is found, $text will be
67
-	 * returned. %n will be replaced with the number of objects.
68
-	 *
69
-	 * The correct plural is determined by the plural_forms-function
70
-	 * provided by the po file.
71
-	 * @since 6.0.0
72
-	 *
73
-	 */
74
-	public function n(string $text_singular, string $text_plural, int $count, array $parameters = []): string;
58
+    /**
59
+     * Translating
60
+     * @param string $text_singular the string to translate for exactly one object
61
+     * @param string $text_plural the string to translate for n objects
62
+     * @param integer $count Number of objects
63
+     * @param array $parameters default:array() Parameters for sprintf
64
+     * @return string Translation or the same text
65
+     *
66
+     * Returns the translation. If no translation is found, $text will be
67
+     * returned. %n will be replaced with the number of objects.
68
+     *
69
+     * The correct plural is determined by the plural_forms-function
70
+     * provided by the po file.
71
+     * @since 6.0.0
72
+     *
73
+     */
74
+    public function n(string $text_singular, string $text_plural, int $count, array $parameters = []): string;
75 75
 
76
-	/**
77
-	 * Localization
78
-	 * @param string $type Type of localization
79
-	 * @param \DateTime|int|string $data parameters for this localization
80
-	 * @param array $options currently supports following options:
81
-	 * 			- 'width': handed into \Punic\Calendar::formatDate as second parameter
82
-	 * @return string|int|false
83
-	 *
84
-	 * Returns the localized data.
85
-	 *
86
-	 * Implemented types:
87
-	 *  - date
88
-	 *    - Creates a date
89
-	 *    - l10n-field: date
90
-	 *    - params: timestamp (int/string)
91
-	 *  - datetime
92
-	 *    - Creates date and time
93
-	 *    - l10n-field: datetime
94
-	 *    - params: timestamp (int/string)
95
-	 *  - time
96
-	 *    - Creates a time
97
-	 *    - l10n-field: time
98
-	 *    - params: timestamp (int/string)
99
-	 * @since 6.0.0 - parameter $options was added in 8.0.0
100
-	 */
101
-	public function l(string $type, $data, array $options = []);
76
+    /**
77
+     * Localization
78
+     * @param string $type Type of localization
79
+     * @param \DateTime|int|string $data parameters for this localization
80
+     * @param array $options currently supports following options:
81
+     * 			- 'width': handed into \Punic\Calendar::formatDate as second parameter
82
+     * @return string|int|false
83
+     *
84
+     * Returns the localized data.
85
+     *
86
+     * Implemented types:
87
+     *  - date
88
+     *    - Creates a date
89
+     *    - l10n-field: date
90
+     *    - params: timestamp (int/string)
91
+     *  - datetime
92
+     *    - Creates date and time
93
+     *    - l10n-field: datetime
94
+     *    - params: timestamp (int/string)
95
+     *  - time
96
+     *    - Creates a time
97
+     *    - l10n-field: time
98
+     *    - params: timestamp (int/string)
99
+     * @since 6.0.0 - parameter $options was added in 8.0.0
100
+     */
101
+    public function l(string $type, $data, array $options = []);
102 102
 
103 103
 
104
-	/**
105
-	 * The code (en, de, ...) of the language that is used for this IL10N object
106
-	 *
107
-	 * @return string language
108
-	 * @since 7.0.0
109
-	 */
110
-	public function getLanguageCode(): string ;
104
+    /**
105
+     * The code (en, de, ...) of the language that is used for this IL10N object
106
+     *
107
+     * @return string language
108
+     * @since 7.0.0
109
+     */
110
+    public function getLanguageCode(): string ;
111 111
 
112
-	/**
113
-	 * * The code (en_US, fr_CA, ...) of the locale that is used for this IL10N object
114
-	 *
115
-	 * @return string locale
116
-	 * @since 14.0.0
117
-	 */
118
-	public function getLocaleCode(): string;
112
+    /**
113
+     * * The code (en_US, fr_CA, ...) of the locale that is used for this IL10N object
114
+     *
115
+     * @return string locale
116
+     * @since 14.0.0
117
+     */
118
+    public function getLocaleCode(): string;
119 119
 }
Please login to merge, or discard this patch.
lib/private/Updater/ChangesResult.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -40,22 +40,22 @@
 block discarded – undo
40 40
  * @method void setData(string $data)
41 41
  */
42 42
 class ChangesResult extends Entity {
43
-	/** @var string */
44
-	protected $version = '';
43
+    /** @var string */
44
+    protected $version = '';
45 45
 
46
-	/** @var string */
47
-	protected $etag = '';
46
+    /** @var string */
47
+    protected $etag = '';
48 48
 
49
-	/** @var int */
50
-	protected $lastCheck = 0;
49
+    /** @var int */
50
+    protected $lastCheck = 0;
51 51
 
52
-	/** @var string */
53
-	protected $data = '';
52
+    /** @var string */
53
+    protected $data = '';
54 54
 
55
-	public function __construct() {
56
-		$this->addType('version', 'string');
57
-		$this->addType('etag', 'string');
58
-		$this->addType('lastCheck', 'int');
59
-		$this->addType('data', 'string');
60
-	}
55
+    public function __construct() {
56
+        $this->addType('version', 'string');
57
+        $this->addType('etag', 'string');
58
+        $this->addType('lastCheck', 'int');
59
+        $this->addType('data', 'string');
60
+    }
61 61
 }
Please login to merge, or discard this patch.
core/Command/Base.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,19 +73,19 @@
 block discarded – undo
73 73
 			default:
74 74
 				foreach ($items as $key => $item) {
75 75
 					if (is_array($item)) {
76
-						$output->writeln($prefix . $key . ':');
77
-						$this->writeArrayInOutputFormat($input, $output, $item, '  ' . $prefix);
76
+						$output->writeln($prefix.$key.':');
77
+						$this->writeArrayInOutputFormat($input, $output, $item, '  '.$prefix);
78 78
 						continue;
79 79
 					}
80 80
 					if (!is_int($key) || ListCommand::class === get_class($this)) {
81 81
 						$value = $this->valueToString($item);
82 82
 						if (!is_null($value)) {
83
-							$output->writeln($prefix . $key . ': ' . $value);
83
+							$output->writeln($prefix.$key.': '.$value);
84 84
 						} else {
85
-							$output->writeln($prefix . $key);
85
+							$output->writeln($prefix.$key);
86 86
 						}
87 87
 					} else {
88
-						$output->writeln($prefix . $this->valueToString($item));
88
+						$output->writeln($prefix.$this->valueToString($item));
89 89
 					}
90 90
 				}
91 91
 				break;
Please login to merge, or discard this patch.
Indentation   +154 added lines, -154 removed lines patch added patch discarded remove patch
@@ -34,158 +34,158 @@
 block discarded – undo
34 34
 use Symfony\Component\Console\Output\OutputInterface;
35 35
 
36 36
 class Base extends Command implements CompletionAwareInterface {
37
-	public const OUTPUT_FORMAT_PLAIN = 'plain';
38
-	public const OUTPUT_FORMAT_JSON = 'json';
39
-	public const OUTPUT_FORMAT_JSON_PRETTY = 'json_pretty';
40
-
41
-	protected $defaultOutputFormat = self::OUTPUT_FORMAT_PLAIN;
42
-
43
-	/** @var boolean */
44
-	private $php_pcntl_signal = false;
45
-
46
-	/** @var boolean */
47
-	private $interrupted = false;
48
-
49
-	protected function configure() {
50
-		$this
51
-			->addOption(
52
-				'output',
53
-				null,
54
-				InputOption::VALUE_OPTIONAL,
55
-				'Output format (plain, json or json_pretty, default is plain)',
56
-				$this->defaultOutputFormat
57
-			)
58
-		;
59
-	}
60
-
61
-	/**
62
-	 * @param InputInterface $input
63
-	 * @param OutputInterface $output
64
-	 * @param array $items
65
-	 * @param string $prefix
66
-	 */
67
-	protected function writeArrayInOutputFormat(InputInterface $input, OutputInterface $output, $items, $prefix = '  - ') {
68
-		switch ($input->getOption('output')) {
69
-			case self::OUTPUT_FORMAT_JSON:
70
-				$output->writeln(json_encode($items));
71
-				break;
72
-			case self::OUTPUT_FORMAT_JSON_PRETTY:
73
-				$output->writeln(json_encode($items, JSON_PRETTY_PRINT));
74
-				break;
75
-			default:
76
-				foreach ($items as $key => $item) {
77
-					if (is_array($item)) {
78
-						$output->writeln($prefix . $key . ':');
79
-						$this->writeArrayInOutputFormat($input, $output, $item, '  ' . $prefix);
80
-						continue;
81
-					}
82
-					if (!is_int($key) || ListCommand::class === get_class($this)) {
83
-						$value = $this->valueToString($item);
84
-						if (!is_null($value)) {
85
-							$output->writeln($prefix . $key . ': ' . $value);
86
-						} else {
87
-							$output->writeln($prefix . $key);
88
-						}
89
-					} else {
90
-						$output->writeln($prefix . $this->valueToString($item));
91
-					}
92
-				}
93
-				break;
94
-		}
95
-	}
96
-
97
-	/**
98
-	 * @param InputInterface $input
99
-	 * @param OutputInterface $output
100
-	 * @param mixed $item
101
-	 */
102
-	protected function writeMixedInOutputFormat(InputInterface $input, OutputInterface $output, $item) {
103
-		if (is_array($item)) {
104
-			$this->writeArrayInOutputFormat($input, $output, $item, '');
105
-			return;
106
-		}
107
-
108
-		switch ($input->getOption('output')) {
109
-			case self::OUTPUT_FORMAT_JSON:
110
-				$output->writeln(json_encode($item));
111
-				break;
112
-			case self::OUTPUT_FORMAT_JSON_PRETTY:
113
-				$output->writeln(json_encode($item, JSON_PRETTY_PRINT));
114
-				break;
115
-			default:
116
-				$output->writeln($this->valueToString($item, false));
117
-				break;
118
-		}
119
-	}
120
-
121
-	protected function valueToString($value, $returnNull = true) {
122
-		if ($value === false) {
123
-			return 'false';
124
-		} elseif ($value === true) {
125
-			return 'true';
126
-		} elseif ($value === null) {
127
-			return $returnNull ? null : 'null';
128
-		} else {
129
-			return $value;
130
-		}
131
-	}
132
-
133
-	/**
134
-	 * Throw InterruptedException when interrupted by user
135
-	 *
136
-	 * @throws InterruptedException
137
-	 */
138
-	protected function abortIfInterrupted() {
139
-		if ($this->php_pcntl_signal === false) {
140
-			return;
141
-		}
142
-
143
-		pcntl_signal_dispatch();
144
-
145
-		if ($this->interrupted === true) {
146
-			throw new InterruptedException('Command interrupted by user');
147
-		}
148
-	}
149
-
150
-	/**
151
-	 * Changes the status of the command to "interrupted" if ctrl-c has been pressed
152
-	 *
153
-	 * Gives a chance to the command to properly terminate what it's doing
154
-	 */
155
-	protected function cancelOperation() {
156
-		$this->interrupted = true;
157
-	}
158
-
159
-	public function run(InputInterface $input, OutputInterface $output) {
160
-		// check if the php pcntl_signal functions are accessible
161
-		$this->php_pcntl_signal = function_exists('pcntl_signal');
162
-		if ($this->php_pcntl_signal) {
163
-			// Collect interrupts and notify the running command
164
-			pcntl_signal(SIGTERM, [$this, 'cancelOperation']);
165
-			pcntl_signal(SIGINT, [$this, 'cancelOperation']);
166
-		}
167
-
168
-		return parent::run($input, $output);
169
-	}
170
-
171
-	/**
172
-	 * @param string $optionName
173
-	 * @param CompletionContext $context
174
-	 * @return string[]
175
-	 */
176
-	public function completeOptionValues($optionName, CompletionContext $context) {
177
-		if ($optionName === 'output') {
178
-			return ['plain', 'json', 'json_pretty'];
179
-		}
180
-		return [];
181
-	}
182
-
183
-	/**
184
-	 * @param string $argumentName
185
-	 * @param CompletionContext $context
186
-	 * @return string[]
187
-	 */
188
-	public function completeArgumentValues($argumentName, CompletionContext $context) {
189
-		return [];
190
-	}
37
+    public const OUTPUT_FORMAT_PLAIN = 'plain';
38
+    public const OUTPUT_FORMAT_JSON = 'json';
39
+    public const OUTPUT_FORMAT_JSON_PRETTY = 'json_pretty';
40
+
41
+    protected $defaultOutputFormat = self::OUTPUT_FORMAT_PLAIN;
42
+
43
+    /** @var boolean */
44
+    private $php_pcntl_signal = false;
45
+
46
+    /** @var boolean */
47
+    private $interrupted = false;
48
+
49
+    protected function configure() {
50
+        $this
51
+            ->addOption(
52
+                'output',
53
+                null,
54
+                InputOption::VALUE_OPTIONAL,
55
+                'Output format (plain, json or json_pretty, default is plain)',
56
+                $this->defaultOutputFormat
57
+            )
58
+        ;
59
+    }
60
+
61
+    /**
62
+     * @param InputInterface $input
63
+     * @param OutputInterface $output
64
+     * @param array $items
65
+     * @param string $prefix
66
+     */
67
+    protected function writeArrayInOutputFormat(InputInterface $input, OutputInterface $output, $items, $prefix = '  - ') {
68
+        switch ($input->getOption('output')) {
69
+            case self::OUTPUT_FORMAT_JSON:
70
+                $output->writeln(json_encode($items));
71
+                break;
72
+            case self::OUTPUT_FORMAT_JSON_PRETTY:
73
+                $output->writeln(json_encode($items, JSON_PRETTY_PRINT));
74
+                break;
75
+            default:
76
+                foreach ($items as $key => $item) {
77
+                    if (is_array($item)) {
78
+                        $output->writeln($prefix . $key . ':');
79
+                        $this->writeArrayInOutputFormat($input, $output, $item, '  ' . $prefix);
80
+                        continue;
81
+                    }
82
+                    if (!is_int($key) || ListCommand::class === get_class($this)) {
83
+                        $value = $this->valueToString($item);
84
+                        if (!is_null($value)) {
85
+                            $output->writeln($prefix . $key . ': ' . $value);
86
+                        } else {
87
+                            $output->writeln($prefix . $key);
88
+                        }
89
+                    } else {
90
+                        $output->writeln($prefix . $this->valueToString($item));
91
+                    }
92
+                }
93
+                break;
94
+        }
95
+    }
96
+
97
+    /**
98
+     * @param InputInterface $input
99
+     * @param OutputInterface $output
100
+     * @param mixed $item
101
+     */
102
+    protected function writeMixedInOutputFormat(InputInterface $input, OutputInterface $output, $item) {
103
+        if (is_array($item)) {
104
+            $this->writeArrayInOutputFormat($input, $output, $item, '');
105
+            return;
106
+        }
107
+
108
+        switch ($input->getOption('output')) {
109
+            case self::OUTPUT_FORMAT_JSON:
110
+                $output->writeln(json_encode($item));
111
+                break;
112
+            case self::OUTPUT_FORMAT_JSON_PRETTY:
113
+                $output->writeln(json_encode($item, JSON_PRETTY_PRINT));
114
+                break;
115
+            default:
116
+                $output->writeln($this->valueToString($item, false));
117
+                break;
118
+        }
119
+    }
120
+
121
+    protected function valueToString($value, $returnNull = true) {
122
+        if ($value === false) {
123
+            return 'false';
124
+        } elseif ($value === true) {
125
+            return 'true';
126
+        } elseif ($value === null) {
127
+            return $returnNull ? null : 'null';
128
+        } else {
129
+            return $value;
130
+        }
131
+    }
132
+
133
+    /**
134
+     * Throw InterruptedException when interrupted by user
135
+     *
136
+     * @throws InterruptedException
137
+     */
138
+    protected function abortIfInterrupted() {
139
+        if ($this->php_pcntl_signal === false) {
140
+            return;
141
+        }
142
+
143
+        pcntl_signal_dispatch();
144
+
145
+        if ($this->interrupted === true) {
146
+            throw new InterruptedException('Command interrupted by user');
147
+        }
148
+    }
149
+
150
+    /**
151
+     * Changes the status of the command to "interrupted" if ctrl-c has been pressed
152
+     *
153
+     * Gives a chance to the command to properly terminate what it's doing
154
+     */
155
+    protected function cancelOperation() {
156
+        $this->interrupted = true;
157
+    }
158
+
159
+    public function run(InputInterface $input, OutputInterface $output) {
160
+        // check if the php pcntl_signal functions are accessible
161
+        $this->php_pcntl_signal = function_exists('pcntl_signal');
162
+        if ($this->php_pcntl_signal) {
163
+            // Collect interrupts and notify the running command
164
+            pcntl_signal(SIGTERM, [$this, 'cancelOperation']);
165
+            pcntl_signal(SIGINT, [$this, 'cancelOperation']);
166
+        }
167
+
168
+        return parent::run($input, $output);
169
+    }
170
+
171
+    /**
172
+     * @param string $optionName
173
+     * @param CompletionContext $context
174
+     * @return string[]
175
+     */
176
+    public function completeOptionValues($optionName, CompletionContext $context) {
177
+        if ($optionName === 'output') {
178
+            return ['plain', 'json', 'json_pretty'];
179
+        }
180
+        return [];
181
+    }
182
+
183
+    /**
184
+     * @param string $argumentName
185
+     * @param CompletionContext $context
186
+     * @return string[]
187
+     */
188
+    public function completeArgumentValues($argumentName, CompletionContext $context) {
189
+        return [];
190
+    }
191 191
 }
Please login to merge, or discard this patch.