Completed
Push — master ( a96350...d0f819 )
by
unknown
29:59
created
lib/public/Security/ICredentialsManager.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -32,42 +32,42 @@
 block discarded – undo
32 32
  * @since 8.2.0
33 33
  */
34 34
 interface ICredentialsManager {
35
-	/**
36
-	 * Store a set of credentials
37
-	 *
38
-	 * @param string $userId empty string for system-wide credentials
39
-	 * @param string $identifier
40
-	 * @param mixed $credentials
41
-	 * @since 8.2.0
42
-	 */
43
-	public function store(string $userId, string $identifier, $credentials): void;
35
+    /**
36
+     * Store a set of credentials
37
+     *
38
+     * @param string $userId empty string for system-wide credentials
39
+     * @param string $identifier
40
+     * @param mixed $credentials
41
+     * @since 8.2.0
42
+     */
43
+    public function store(string $userId, string $identifier, $credentials): void;
44 44
 
45
-	/**
46
-	 * Retrieve a set of credentials
47
-	 *
48
-	 * @param string $userId empty string for system-wide credentials
49
-	 * @param string $identifier
50
-	 * @return mixed
51
-	 * @since 8.2.0
52
-	 */
53
-	public function retrieve(string $userId, string $identifier);
45
+    /**
46
+     * Retrieve a set of credentials
47
+     *
48
+     * @param string $userId empty string for system-wide credentials
49
+     * @param string $identifier
50
+     * @return mixed
51
+     * @since 8.2.0
52
+     */
53
+    public function retrieve(string $userId, string $identifier);
54 54
 
55
-	/**
56
-	 * Delete a set of credentials
57
-	 *
58
-	 * @param string $userId empty string for system-wide credentials
59
-	 * @param string $identifier
60
-	 * @return int rows removed
61
-	 * @since 8.2.0
62
-	 */
63
-	public function delete(string $userId, string $identifier): int;
55
+    /**
56
+     * Delete a set of credentials
57
+     *
58
+     * @param string $userId empty string for system-wide credentials
59
+     * @param string $identifier
60
+     * @return int rows removed
61
+     * @since 8.2.0
62
+     */
63
+    public function delete(string $userId, string $identifier): int;
64 64
 
65
-	/**
66
-	 * Erase all credentials stored for a user
67
-	 *
68
-	 * @param string $userId
69
-	 * @return int rows removed
70
-	 * @since 8.2.0
71
-	 */
72
-	public function erase(string $userId): int;
65
+    /**
66
+     * Erase all credentials stored for a user
67
+     *
68
+     * @param string $userId
69
+     * @return int rows removed
70
+     * @since 8.2.0
71
+     */
72
+    public function erase(string $userId): int;
73 73
 }
Please login to merge, or discard this patch.
lib/public/Security/FeaturePolicy/AddFeaturePolicyEvent.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -37,21 +37,21 @@
 block discarded – undo
37 37
  * @since 17.0.0
38 38
  */
39 39
 class AddFeaturePolicyEvent extends Event {
40
-	/** @var FeaturePolicyManager */
41
-	private $policyManager;
40
+    /** @var FeaturePolicyManager */
41
+    private $policyManager;
42 42
 
43
-	/**
44
-	 * @since 17.0.0
45
-	 */
46
-	public function __construct(FeaturePolicyManager $policyManager) {
47
-		parent::__construct();
48
-		$this->policyManager = $policyManager;
49
-	}
43
+    /**
44
+     * @since 17.0.0
45
+     */
46
+    public function __construct(FeaturePolicyManager $policyManager) {
47
+        parent::__construct();
48
+        $this->policyManager = $policyManager;
49
+    }
50 50
 
51
-	/**
52
-	 * @since 17.0.0
53
-	 */
54
-	public function addPolicy(EmptyFeaturePolicy $policy) {
55
-		$this->policyManager->addDefaultPolicy($policy);
56
-	}
51
+    /**
52
+     * @since 17.0.0
53
+     */
54
+    public function addPolicy(EmptyFeaturePolicy $policy) {
55
+        $this->policyManager->addDefaultPolicy($policy);
56
+    }
57 57
 }
Please login to merge, or discard this patch.
lib/public/Security/IRemoteHostValidator.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -31,20 +31,20 @@
 block discarded – undo
31 31
  * @since 26.0.0
32 32
  */
33 33
 interface IRemoteHostValidator {
34
-	/**
35
-	 * Validate if a host may be connected to
36
-	 *
37
-	 * By default, Nextcloud does not connect to any local servers. That is neither
38
-	 * localhost nor any host in the local network.
39
-	 *
40
-	 * Admins can overwrite this behavior with the global `allow_local_remote_servers`
41
-	 * settings flag. If the flag is set to `true`, local hosts will be considered
42
-	 * valid.
43
-	 *
44
-	 * @param string $host hostname of the remote server, IPv4 or IPv6 address
45
-	 *
46
-	 * @return bool
47
-	 * @since 26.0.0
48
-	 */
49
-	public function isValid(string $host): bool;
34
+    /**
35
+     * Validate if a host may be connected to
36
+     *
37
+     * By default, Nextcloud does not connect to any local servers. That is neither
38
+     * localhost nor any host in the local network.
39
+     *
40
+     * Admins can overwrite this behavior with the global `allow_local_remote_servers`
41
+     * settings flag. If the flag is set to `true`, local hosts will be considered
42
+     * valid.
43
+     *
44
+     * @param string $host hostname of the remote server, IPv4 or IPv6 address
45
+     *
46
+     * @return bool
47
+     * @since 26.0.0
48
+     */
49
+    public function isValid(string $host): bool;
50 50
 }
Please login to merge, or discard this patch.
lib/public/Security/CSP/AddContentSecurityPolicyEvent.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -45,21 +45,21 @@
 block discarded – undo
45 45
  * @since 17.0.0
46 46
  */
47 47
 class AddContentSecurityPolicyEvent extends Event {
48
-	/** @var ContentSecurityPolicyManager */
49
-	private $policyManager;
48
+    /** @var ContentSecurityPolicyManager */
49
+    private $policyManager;
50 50
 
51
-	/**
52
-	 * @since 17.0.0
53
-	 */
54
-	public function __construct(ContentSecurityPolicyManager $policyManager) {
55
-		parent::__construct();
56
-		$this->policyManager = $policyManager;
57
-	}
51
+    /**
52
+     * @since 17.0.0
53
+     */
54
+    public function __construct(ContentSecurityPolicyManager $policyManager) {
55
+        parent::__construct();
56
+        $this->policyManager = $policyManager;
57
+    }
58 58
 
59
-	/**
60
-	 * @since 17.0.0
61
-	 */
62
-	public function addPolicy(EmptyContentSecurityPolicy $csp): void {
63
-		$this->policyManager->addDefaultPolicy($csp);
64
-	}
59
+    /**
60
+     * @since 17.0.0
61
+     */
62
+    public function addPolicy(EmptyContentSecurityPolicy $csp): void {
63
+        $this->policyManager->addDefaultPolicy($csp);
64
+    }
65 65
 }
Please login to merge, or discard this patch.
lib/public/Security/ICrypto.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -37,31 +37,31 @@
 block discarded – undo
37 37
  * @since 8.0.0
38 38
  */
39 39
 interface ICrypto {
40
-	/**
41
-	 * @param string $message The message to authenticate
42
-	 * @param string $password Password to use (defaults to `secret` in config.php)
43
-	 * @return string Calculated HMAC
44
-	 * @since 8.0.0
45
-	 */
46
-	public function calculateHMAC(string $message, string $password = ''): string;
40
+    /**
41
+     * @param string $message The message to authenticate
42
+     * @param string $password Password to use (defaults to `secret` in config.php)
43
+     * @return string Calculated HMAC
44
+     * @since 8.0.0
45
+     */
46
+    public function calculateHMAC(string $message, string $password = ''): string;
47 47
 
48
-	/**
49
-	 * Encrypts a value and adds an HMAC (Encrypt-Then-MAC)
50
-	 * @param string $plaintext
51
-	 * @param string $password Password to encrypt, if not specified the secret from config.php will be taken
52
-	 * @return string Authenticated ciphertext
53
-	 * @since 8.0.0
54
-	 */
55
-	public function encrypt(string $plaintext, string $password = ''): string;
48
+    /**
49
+     * Encrypts a value and adds an HMAC (Encrypt-Then-MAC)
50
+     * @param string $plaintext
51
+     * @param string $password Password to encrypt, if not specified the secret from config.php will be taken
52
+     * @return string Authenticated ciphertext
53
+     * @since 8.0.0
54
+     */
55
+    public function encrypt(string $plaintext, string $password = ''): string;
56 56
 
57
-	/**
58
-	 * Decrypts a value and verifies the HMAC (Encrypt-Then-Mac)
59
-	 * @param string $authenticatedCiphertext
60
-	 * @param string $password Password to encrypt, if not specified the secret from config.php will be taken
61
-	 * @return string plaintext
62
-	 * @throws \Exception If the HMAC does not match
63
-	 * @throws \Exception If the decryption failed
64
-	 * @since 8.0.0
65
-	 */
66
-	public function decrypt(string $authenticatedCiphertext, string $password = ''): string;
57
+    /**
58
+     * Decrypts a value and verifies the HMAC (Encrypt-Then-Mac)
59
+     * @param string $authenticatedCiphertext
60
+     * @param string $password Password to encrypt, if not specified the secret from config.php will be taken
61
+     * @return string plaintext
62
+     * @throws \Exception If the HMAC does not match
63
+     * @throws \Exception If the decryption failed
64
+     * @since 8.0.0
65
+     */
66
+    public function decrypt(string $authenticatedCiphertext, string $password = ''): string;
67 67
 }
Please login to merge, or discard this patch.
lib/public/Security/VerificationToken/IVerificationToken.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -32,30 +32,30 @@
 block discarded – undo
32 32
  * @since 23.0.0
33 33
  */
34 34
 interface IVerificationToken {
35
-	/**
36
-	 * Checks whether the a provided tokent matches a stored token and its
37
-	 * constraints. An InvalidTokenException is thrown on issues, otherwise
38
-	 * the check is successful.
39
-	 *
40
-	 * null can be passed as $user, but mind that this is for conveniently
41
-	 * passing the return of IUserManager::getUser() to this method. When
42
-	 * $user is null, InvalidTokenException is thrown for all the issued
43
-	 * tokens are user related.
44
-	 *
45
-	 * @throws InvalidTokenException
46
-	 * @since 23.0.0
47
-	 */
48
-	public function check(string $token, ?IUser $user, string $subject, string $passwordPrefix = '', bool $expiresWithLogin = false): void;
35
+    /**
36
+     * Checks whether the a provided tokent matches a stored token and its
37
+     * constraints. An InvalidTokenException is thrown on issues, otherwise
38
+     * the check is successful.
39
+     *
40
+     * null can be passed as $user, but mind that this is for conveniently
41
+     * passing the return of IUserManager::getUser() to this method. When
42
+     * $user is null, InvalidTokenException is thrown for all the issued
43
+     * tokens are user related.
44
+     *
45
+     * @throws InvalidTokenException
46
+     * @since 23.0.0
47
+     */
48
+    public function check(string $token, ?IUser $user, string $subject, string $passwordPrefix = '', bool $expiresWithLogin = false): void;
49 49
 
50
-	/**
51
-	 * @since 23.0.0
52
-	 */
53
-	public function create(IUser $user, string $subject, string $passwordPrefix = ''): string;
50
+    /**
51
+     * @since 23.0.0
52
+     */
53
+    public function create(IUser $user, string $subject, string $passwordPrefix = ''): string;
54 54
 
55
-	/**
56
-	 * Deletes the token identified by the provided parameters
57
-	 *
58
-	 * @since 23.0.0
59
-	 */
60
-	public function delete(string $token, IUser $user, string $subject): void;
55
+    /**
56
+     * Deletes the token identified by the provided parameters
57
+     *
58
+     * @since 23.0.0
59
+     */
60
+    public function delete(string $token, IUser $user, string $subject): void;
61 61
 }
Please login to merge, or discard this patch.
lib/public/DirectEditing/IManager.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -35,65 +35,65 @@
 block discarded – undo
35 35
  * @since 18.0.0
36 36
  */
37 37
 interface IManager {
38
-	/**
39
-	 * Register a new editor
40
-	 *
41
-	 * @since 18.0.0
42
-	 * @param IEditor $directEditor
43
-	 */
44
-	public function registerDirectEditor(IEditor $directEditor): void;
38
+    /**
39
+     * Register a new editor
40
+     *
41
+     * @since 18.0.0
42
+     * @param IEditor $directEditor
43
+     */
44
+    public function registerDirectEditor(IEditor $directEditor): void;
45 45
 
46
-	/**
47
-	 * Open the editing page for a provided token
48
-	 *
49
-	 * @since 18.0.0
50
-	 * @param string $token
51
-	 * @return Response
52
-	 */
53
-	public function edit(string $token): Response;
46
+    /**
47
+     * Open the editing page for a provided token
48
+     *
49
+     * @since 18.0.0
50
+     * @param string $token
51
+     * @return Response
52
+     */
53
+    public function edit(string $token): Response;
54 54
 
55
-	/**
56
-	 * Create a new token based on the file path and editor details
57
-	 *
58
-	 * @since 18.0.0
59
-	 * @param string $path
60
-	 * @param string $editorId
61
-	 * @param string $creatorId
62
-	 * @param null $templateId
63
-	 * @return string
64
-	 * @throws NotPermittedException
65
-	 * @throws RuntimeException
66
-	 */
67
-	public function create(string $path, string $editorId, string $creatorId, $templateId = null): string;
55
+    /**
56
+     * Create a new token based on the file path and editor details
57
+     *
58
+     * @since 18.0.0
59
+     * @param string $path
60
+     * @param string $editorId
61
+     * @param string $creatorId
62
+     * @param null $templateId
63
+     * @return string
64
+     * @throws NotPermittedException
65
+     * @throws RuntimeException
66
+     */
67
+    public function create(string $path, string $editorId, string $creatorId, $templateId = null): string;
68 68
 
69
-	/**
70
-	 * Get the token details for a given token
71
-	 *
72
-	 * @since 18.0.0
73
-	 * @param string $token
74
-	 * @return IToken
75
-	 */
76
-	public function getToken(string $token): IToken;
69
+    /**
70
+     * Get the token details for a given token
71
+     *
72
+     * @since 18.0.0
73
+     * @param string $token
74
+     * @return IToken
75
+     */
76
+    public function getToken(string $token): IToken;
77 77
 
78
-	/**
79
-	 * Cleanup expired tokens
80
-	 *
81
-	 * @since 18.0.0
82
-	 * @return int number of deleted tokens
83
-	 */
84
-	public function cleanup(): int;
78
+    /**
79
+     * Cleanup expired tokens
80
+     *
81
+     * @since 18.0.0
82
+     * @return int number of deleted tokens
83
+     */
84
+    public function cleanup(): int;
85 85
 
86
-	/**
87
-	 * Check if direct editing is enabled
88
-	 *
89
-	 * @since 20.0.0
90
-	 * @return bool
91
-	 */
92
-	public function isEnabled(): bool;
86
+    /**
87
+     * Check if direct editing is enabled
88
+     *
89
+     * @since 20.0.0
90
+     * @return bool
91
+     */
92
+    public function isEnabled(): bool;
93 93
 
94
-	/**
95
-	 * @since 24.0.0
96
-	 * @return IEditor[]
97
-	 */
98
-	public function getEditors(): array;
94
+    /**
95
+     * @since 24.0.0
96
+     * @return IEditor[]
97
+     */
98
+    public function getEditors(): array;
99 99
 }
Please login to merge, or discard this patch.
lib/public/DirectEditing/ACreateFromTemplate.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
  * @since 18.0.0
27 27
  */
28 28
 abstract class ACreateFromTemplate extends ACreateEmpty {
29
-	/**
30
-	 * List of available templates for the create from template action
31
-	 *
32
-	 * @since 18.0.0
33
-	 * @return ATemplate[]
34
-	 */
35
-	abstract public function getTemplates(): array;
29
+    /**
30
+     * List of available templates for the create from template action
31
+     *
32
+     * @since 18.0.0
33
+     * @return ATemplate[]
34
+     */
35
+    abstract public function getTemplates(): array;
36 36
 }
Please login to merge, or discard this patch.
lib/public/DirectEditing/RegisterDirectEditorEvent.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -31,27 +31,27 @@
 block discarded – undo
31 31
  * @since 18.0.0
32 32
  */
33 33
 class RegisterDirectEditorEvent extends Event {
34
-	/**
35
-	 * @var IManager
36
-	 */
37
-	private $manager;
34
+    /**
35
+     * @var IManager
36
+     */
37
+    private $manager;
38 38
 
39
-	/**
40
-	 * RegisterDirectEditorEvent constructor.
41
-	 *
42
-	 * @param IManager $manager
43
-	 * @since 18.0.0
44
-	 */
45
-	public function __construct(IManager $manager) {
46
-		parent::__construct();
47
-		$this->manager = $manager;
48
-	}
39
+    /**
40
+     * RegisterDirectEditorEvent constructor.
41
+     *
42
+     * @param IManager $manager
43
+     * @since 18.0.0
44
+     */
45
+    public function __construct(IManager $manager) {
46
+        parent::__construct();
47
+        $this->manager = $manager;
48
+    }
49 49
 
50
-	/**
51
-	 * @since 18.0.0
52
-	 * @param IEditor $editor
53
-	 */
54
-	public function register(IEditor $editor): void {
55
-		$this->manager->registerDirectEditor($editor);
56
-	}
50
+    /**
51
+     * @since 18.0.0
52
+     * @param IEditor $editor
53
+     */
54
+    public function register(IEditor $editor): void {
55
+        $this->manager->registerDirectEditor($editor);
56
+    }
57 57
 }
Please login to merge, or discard this patch.