Passed
Push — master ( 6156a4...5d03b5 )
by Blizzz
14:08 queued 10s
created
lib/public/Mail/IMessage.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -32,64 +32,64 @@
 block discarded – undo
32 32
  */
33 33
 interface IMessage {
34 34
 
35
-	/**
36
-	 * @param IAttachment $attachment
37
-	 * @return IMessage
38
-	 * @since 13.0.0
39
-	 */
40
-	public function attach(IAttachment $attachment): IMessage;
35
+    /**
36
+     * @param IAttachment $attachment
37
+     * @return IMessage
38
+     * @since 13.0.0
39
+     */
40
+    public function attach(IAttachment $attachment): IMessage;
41 41
 
42
-	/**
43
-	 * Set the from address of this message.
44
-	 *
45
-	 * If no "From" address is used \OC\Mail\Mailer will use mail_from_address and mail_domain from config.php
46
-	 *
47
-	 * @param array $addresses Example: array('[email protected]', '[email protected]' => 'A name')
48
-	 * @return IMessage
49
-	 * @since 13.0.0
50
-	 */
51
-	public function setFrom(array $addresses): IMessage;
42
+    /**
43
+     * Set the from address of this message.
44
+     *
45
+     * If no "From" address is used \OC\Mail\Mailer will use mail_from_address and mail_domain from config.php
46
+     *
47
+     * @param array $addresses Example: array('[email protected]', '[email protected]' => 'A name')
48
+     * @return IMessage
49
+     * @since 13.0.0
50
+     */
51
+    public function setFrom(array $addresses): IMessage;
52 52
 
53
-	/**
54
-	 * Set the Reply-To address of this message
55
-	 *
56
-	 * @param array $addresses
57
-	 * @return IMessage
58
-	 * @since 13.0.0
59
-	 */
60
-	public function setReplyTo(array $addresses): IMessage;
53
+    /**
54
+     * Set the Reply-To address of this message
55
+     *
56
+     * @param array $addresses
57
+     * @return IMessage
58
+     * @since 13.0.0
59
+     */
60
+    public function setReplyTo(array $addresses): IMessage;
61 61
 
62
-	/**
63
-	 * Set the to addresses of this message.
64
-	 *
65
-	 * @param array $recipients Example: array('[email protected]', '[email protected]' => 'A name')
66
-	 * @return IMessage
67
-	 * @since 13.0.0
68
-	 */
69
-	public function setTo(array $recipients): IMessage;
62
+    /**
63
+     * Set the to addresses of this message.
64
+     *
65
+     * @param array $recipients Example: array('[email protected]', '[email protected]' => 'A name')
66
+     * @return IMessage
67
+     * @since 13.0.0
68
+     */
69
+    public function setTo(array $recipients): IMessage;
70 70
 
71
-	/**
72
-	 * Set the CC recipients of this message.
73
-	 *
74
-	 * @param array $recipients Example: array('[email protected]', '[email protected]' => 'A name')
75
-	 * @return IMessage
76
-	 * @since 13.0.0
77
-	 */
78
-	public function setCc(array $recipients): IMessage;
71
+    /**
72
+     * Set the CC recipients of this message.
73
+     *
74
+     * @param array $recipients Example: array('[email protected]', '[email protected]' => 'A name')
75
+     * @return IMessage
76
+     * @since 13.0.0
77
+     */
78
+    public function setCc(array $recipients): IMessage;
79 79
 
80
-	/**
81
-	 * Set the BCC recipients of this message.
82
-	 *
83
-	 * @param array $recipients Example: array('[email protected]', '[email protected]' => 'A name')
84
-	 * @return IMessage
85
-	 * @since 13.0.0
86
-	 */
87
-	public function setBcc(array $recipients): IMessage;
80
+    /**
81
+     * Set the BCC recipients of this message.
82
+     *
83
+     * @param array $recipients Example: array('[email protected]', '[email protected]' => 'A name')
84
+     * @return IMessage
85
+     * @since 13.0.0
86
+     */
87
+    public function setBcc(array $recipients): IMessage;
88 88
 
89
-	/**
90
-	 * @param IEMailTemplate $emailTemplate
91
-	 * @return IMessage
92
-	 * @since 13.0.0
93
-	 */
94
-	public function useTemplate(IEMailTemplate $emailTemplate): IMessage;
89
+    /**
90
+     * @param IEMailTemplate $emailTemplate
91
+     * @return IMessage
92
+     * @since 13.0.0
93
+     */
94
+    public function useTemplate(IEMailTemplate $emailTemplate): IMessage;
95 95
 }
Please login to merge, or discard this patch.
lib/private/Security/CSRF/CsrfTokenGenerator.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -32,23 +32,23 @@
 block discarded – undo
32 32
  * @package OC\Security\CSRF
33 33
  */
34 34
 class CsrfTokenGenerator {
35
-	/** @var ISecureRandom  */
36
-	private $random;
35
+    /** @var ISecureRandom  */
36
+    private $random;
37 37
 
38
-	/**
39
-	 * @param ISecureRandom $random
40
-	 */
41
-	public function __construct(ISecureRandom $random) {
42
-		$this->random = $random;
43
-	}
38
+    /**
39
+     * @param ISecureRandom $random
40
+     */
41
+    public function __construct(ISecureRandom $random) {
42
+        $this->random = $random;
43
+    }
44 44
 
45
-	/**
46
-	 * Generate a new CSRF token.
47
-	 *
48
-	 * @param int $length Length of the token in characters.
49
-	 * @return string
50
-	 */
51
-	public function generateToken(int $length = 32): string {
52
-		return $this->random->generate($length);
53
-	}
45
+    /**
46
+     * Generate a new CSRF token.
47
+     *
48
+     * @param int $length Length of the token in characters.
49
+     * @return string
50
+     */
51
+    public function generateToken(int $length = 32): string {
52
+        return $this->random->generate($length);
53
+    }
54 54
 }
Please login to merge, or discard this patch.
lib/private/Security/IdentityProof/Key.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -25,25 +25,25 @@
 block discarded – undo
25 25
 namespace OC\Security\IdentityProof;
26 26
 
27 27
 class Key {
28
-	/** @var string */
29
-	private $publicKey;
30
-	/** @var string */
31
-	private $privateKey;
28
+    /** @var string */
29
+    private $publicKey;
30
+    /** @var string */
31
+    private $privateKey;
32 32
 
33
-	/**
34
-	 * @param string $publicKey
35
-	 * @param string $privateKey
36
-	 */
37
-	public function __construct(string $publicKey, string $privateKey) {
38
-		$this->publicKey = $publicKey;
39
-		$this->privateKey = $privateKey;
40
-	}
33
+    /**
34
+     * @param string $publicKey
35
+     * @param string $privateKey
36
+     */
37
+    public function __construct(string $publicKey, string $privateKey) {
38
+        $this->publicKey = $publicKey;
39
+        $this->privateKey = $privateKey;
40
+    }
41 41
 
42
-	public function getPrivate(): string {
43
-		return $this->privateKey;
44
-	}
42
+    public function getPrivate(): string {
43
+        return $this->privateKey;
44
+    }
45 45
 
46
-	public function getPublic(): string {
47
-		return $this->publicKey;
48
-	}
46
+    public function getPublic(): string {
47
+        return $this->publicKey;
48
+    }
49 49
 }
Please login to merge, or discard this patch.
apps/dav/lib/Upload/ChunkingPlugin.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
 
101 101
 		// casted to string because cast to float cause equality for non equal numbers
102 102
 		// and integer has the problem of limited size on 32 bit systems
103
-		if ((string)$expectedSize !== (string)$actualSize) {
103
+		if ((string) $expectedSize !== (string) $actualSize) {
104 104
 			throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize bytes");
105 105
 		}
106 106
 	}
Please login to merge, or discard this patch.
Indentation   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -35,97 +35,97 @@
 block discarded – undo
35 35
 
36 36
 class ChunkingPlugin extends ServerPlugin {
37 37
 
38
-	/** @var Server */
39
-	private $server;
40
-	/** @var FutureFile */
41
-	private $sourceNode;
38
+    /** @var Server */
39
+    private $server;
40
+    /** @var FutureFile */
41
+    private $sourceNode;
42 42
 
43
-	/**
44
-	 * @inheritdoc
45
-	 */
46
-	public function initialize(Server $server) {
47
-		$server->on('beforeMove', [$this, 'beforeMove']);
48
-		$this->server = $server;
49
-	}
43
+    /**
44
+     * @inheritdoc
45
+     */
46
+    public function initialize(Server $server) {
47
+        $server->on('beforeMove', [$this, 'beforeMove']);
48
+        $this->server = $server;
49
+    }
50 50
 
51
-	/**
52
-	 * @param string $sourcePath source path
53
-	 * @param string $destination destination path
54
-	 * @return bool|void
55
-	 * @throws BadRequest
56
-	 * @throws NotFound
57
-	 */
58
-	public function beforeMove($sourcePath, $destination) {
59
-		$this->sourceNode = $this->server->tree->getNodeForPath($sourcePath);
60
-		if (!$this->sourceNode instanceof FutureFile) {
61
-			// skip handling as the source is not a chunked FutureFile
62
-			return;
63
-		}
51
+    /**
52
+     * @param string $sourcePath source path
53
+     * @param string $destination destination path
54
+     * @return bool|void
55
+     * @throws BadRequest
56
+     * @throws NotFound
57
+     */
58
+    public function beforeMove($sourcePath, $destination) {
59
+        $this->sourceNode = $this->server->tree->getNodeForPath($sourcePath);
60
+        if (!$this->sourceNode instanceof FutureFile) {
61
+            // skip handling as the source is not a chunked FutureFile
62
+            return;
63
+        }
64 64
 
65
-		try {
66
-			/** @var INode $destinationNode */
67
-			$destinationNode = $this->server->tree->getNodeForPath($destination);
68
-			if ($destinationNode instanceof Directory) {
69
-				throw new BadRequest("The given destination $destination is a directory.");
70
-			}
71
-		} catch (NotFound $e) {
72
-			// If the destination does not exist yet it's not a directory either ;)
73
-		}
65
+        try {
66
+            /** @var INode $destinationNode */
67
+            $destinationNode = $this->server->tree->getNodeForPath($destination);
68
+            if ($destinationNode instanceof Directory) {
69
+                throw new BadRequest("The given destination $destination is a directory.");
70
+            }
71
+        } catch (NotFound $e) {
72
+            // If the destination does not exist yet it's not a directory either ;)
73
+        }
74 74
 
75
-		$this->verifySize();
76
-		return $this->performMove($sourcePath, $destination);
77
-	}
75
+        $this->verifySize();
76
+        return $this->performMove($sourcePath, $destination);
77
+    }
78 78
 
79
-	/**
80
-	 * Move handler for future file.
81
-	 *
82
-	 * This overrides the default move behavior to prevent Sabre
83
-	 * to delete the target file before moving. Because deleting would
84
-	 * lose the file id and metadata.
85
-	 *
86
-	 * @param string $path source path
87
-	 * @param string $destination destination path
88
-	 * @return bool|void false to stop handling, void to skip this handler
89
-	 */
90
-	public function performMove($path, $destination) {
91
-		$fileExists = $this->server->tree->nodeExists($destination);
92
-		// do a move manually, skipping Sabre's default "delete" for existing nodes
93
-		try {
94
-			$this->server->tree->move($path, $destination);
95
-		} catch (Forbidden $e) {
96
-			$sourceNode = $this->server->tree->getNodeForPath($path);
97
-			if ($sourceNode instanceof FutureFile) {
98
-				$sourceNode->delete();
99
-			}
100
-			throw $e;
101
-		}
79
+    /**
80
+     * Move handler for future file.
81
+     *
82
+     * This overrides the default move behavior to prevent Sabre
83
+     * to delete the target file before moving. Because deleting would
84
+     * lose the file id and metadata.
85
+     *
86
+     * @param string $path source path
87
+     * @param string $destination destination path
88
+     * @return bool|void false to stop handling, void to skip this handler
89
+     */
90
+    public function performMove($path, $destination) {
91
+        $fileExists = $this->server->tree->nodeExists($destination);
92
+        // do a move manually, skipping Sabre's default "delete" for existing nodes
93
+        try {
94
+            $this->server->tree->move($path, $destination);
95
+        } catch (Forbidden $e) {
96
+            $sourceNode = $this->server->tree->getNodeForPath($path);
97
+            if ($sourceNode instanceof FutureFile) {
98
+                $sourceNode->delete();
99
+            }
100
+            throw $e;
101
+        }
102 102
 
103
-		// trigger all default events (copied from CorePlugin::move)
104
-		$this->server->emit('afterMove', [$path, $destination]);
105
-		$this->server->emit('afterUnbind', [$path]);
106
-		$this->server->emit('afterBind', [$destination]);
103
+        // trigger all default events (copied from CorePlugin::move)
104
+        $this->server->emit('afterMove', [$path, $destination]);
105
+        $this->server->emit('afterUnbind', [$path]);
106
+        $this->server->emit('afterBind', [$destination]);
107 107
 
108
-		$response = $this->server->httpResponse;
109
-		$response->setHeader('Content-Length', '0');
110
-		$response->setStatus($fileExists ? 204 : 201);
108
+        $response = $this->server->httpResponse;
109
+        $response->setHeader('Content-Length', '0');
110
+        $response->setStatus($fileExists ? 204 : 201);
111 111
 
112
-		return false;
113
-	}
112
+        return false;
113
+    }
114 114
 
115
-	/**
116
-	 * @throws BadRequest
117
-	 */
118
-	private function verifySize() {
119
-		$expectedSize = $this->server->httpRequest->getHeader('OC-Total-Length');
120
-		if ($expectedSize === null) {
121
-			return;
122
-		}
123
-		$actualSize = $this->sourceNode->getSize();
115
+    /**
116
+     * @throws BadRequest
117
+     */
118
+    private function verifySize() {
119
+        $expectedSize = $this->server->httpRequest->getHeader('OC-Total-Length');
120
+        if ($expectedSize === null) {
121
+            return;
122
+        }
123
+        $actualSize = $this->sourceNode->getSize();
124 124
 
125
-		// casted to string because cast to float cause equality for non equal numbers
126
-		// and integer has the problem of limited size on 32 bit systems
127
-		if ((string)$expectedSize !== (string)$actualSize) {
128
-			throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize bytes");
129
-		}
130
-	}
125
+        // casted to string because cast to float cause equality for non equal numbers
126
+        // and integer has the problem of limited size on 32 bit systems
127
+        if ((string)$expectedSize !== (string)$actualSize) {
128
+            throw new BadRequest("Chunks on server do not sum up to $expectedSize but to $actualSize bytes");
129
+        }
130
+    }
131 131
 }
Please login to merge, or discard this patch.
lib/public/BackgroundJob.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -32,18 +32,18 @@
 block discarded – undo
32 32
  * @deprecated 14.0.0
33 33
  */
34 34
 class BackgroundJob {
35
-	/**
36
-	 * @since 5.0.0
37
-	 * @deprecated 14.0.0
38
-	 */
39
-	public static function getExecutionType() {
40
-		return '';
41
-	}
35
+    /**
36
+     * @since 5.0.0
37
+     * @deprecated 14.0.0
38
+     */
39
+    public static function getExecutionType() {
40
+        return '';
41
+    }
42 42
 
43
-	/**
44
-	 * @since 5.0.0
45
-	 * @deprecated 14.0.0
46
-	 */
47
-	public static function setExecutionType($type) {
48
-	}
43
+    /**
44
+     * @since 5.0.0
45
+     * @deprecated 14.0.0
46
+     */
47
+    public static function setExecutionType($type) {
48
+    }
49 49
 }
Please login to merge, or discard this patch.
lib/private/Files/Storage/Flysystem.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	}
57 57
 
58 58
 	protected function buildPath($path) {
59
-		$fullPath = \OC\Files\Filesystem::normalizePath($this->root . '/' . $path);
59
+		$fullPath = \OC\Files\Filesystem::normalizePath($this->root.'/'.$path);
60 60
 		return ltrim($fullPath, '/');
61 61
 	}
62 62
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		} catch (FileNotFoundException $e) {
164 164
 			return false;
165 165
 		}
166
-		$names = array_map(function ($object) {
166
+		$names = array_map(function($object) {
167 167
 			return $object['basename'];
168 168
 		}, $content);
169 169
 		return IteratorDirectory::wrap($names);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 					$tmpFile = \OC::$server->getTempManager()->getTemporaryFile();
210 210
 				}
211 211
 				$source = fopen($tmpFile, $mode);
212
-				return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath) {
212
+				return CallbackWrapper::wrap($source, null, null, function() use ($tmpFile, $fullPath) {
213 213
 					$this->flysystem->putStream($fullPath, fopen($tmpFile, 'r'));
214 214
 					unlink($tmpFile);
215 215
 				});
Please login to merge, or discard this patch.
Indentation   +202 added lines, -202 removed lines patch added patch discarded remove patch
@@ -36,224 +36,224 @@
 block discarded – undo
36 36
  * To use: subclass and call $this->buildFlysystem with the flysystem adapter of choice
37 37
  */
38 38
 abstract class Flysystem extends Common {
39
-	/**
40
-	 * @var Filesystem
41
-	 */
42
-	protected $flysystem;
39
+    /**
40
+     * @var Filesystem
41
+     */
42
+    protected $flysystem;
43 43
 
44
-	/**
45
-	 * @var string
46
-	 */
47
-	protected $root = '';
44
+    /**
45
+     * @var string
46
+     */
47
+    protected $root = '';
48 48
 
49
-	/**
50
-	 * Initialize the storage backend with a flyssytem adapter
51
-	 *
52
-	 * @param \League\Flysystem\AdapterInterface $adapter
53
-	 */
54
-	protected function buildFlySystem(AdapterInterface $adapter) {
55
-		$this->flysystem = new Filesystem($adapter);
56
-		$this->flysystem->addPlugin(new GetWithMetadata());
57
-	}
49
+    /**
50
+     * Initialize the storage backend with a flyssytem adapter
51
+     *
52
+     * @param \League\Flysystem\AdapterInterface $adapter
53
+     */
54
+    protected function buildFlySystem(AdapterInterface $adapter) {
55
+        $this->flysystem = new Filesystem($adapter);
56
+        $this->flysystem->addPlugin(new GetWithMetadata());
57
+    }
58 58
 
59
-	protected function buildPath($path) {
60
-		$fullPath = \OC\Files\Filesystem::normalizePath($this->root . '/' . $path);
61
-		return ltrim($fullPath, '/');
62
-	}
59
+    protected function buildPath($path) {
60
+        $fullPath = \OC\Files\Filesystem::normalizePath($this->root . '/' . $path);
61
+        return ltrim($fullPath, '/');
62
+    }
63 63
 
64
-	/**
65
-	 * {@inheritdoc}
66
-	 */
67
-	public function file_get_contents($path) {
68
-		return $this->flysystem->read($this->buildPath($path));
69
-	}
64
+    /**
65
+     * {@inheritdoc}
66
+     */
67
+    public function file_get_contents($path) {
68
+        return $this->flysystem->read($this->buildPath($path));
69
+    }
70 70
 
71
-	/**
72
-	 * {@inheritdoc}
73
-	 */
74
-	public function file_put_contents($path, $data) {
75
-		return $this->flysystem->put($this->buildPath($path), $data);
76
-	}
71
+    /**
72
+     * {@inheritdoc}
73
+     */
74
+    public function file_put_contents($path, $data) {
75
+        return $this->flysystem->put($this->buildPath($path), $data);
76
+    }
77 77
 
78
-	/**
79
-	 * {@inheritdoc}
80
-	 */
81
-	public function file_exists($path) {
82
-		return $this->flysystem->has($this->buildPath($path));
83
-	}
78
+    /**
79
+     * {@inheritdoc}
80
+     */
81
+    public function file_exists($path) {
82
+        return $this->flysystem->has($this->buildPath($path));
83
+    }
84 84
 
85
-	/**
86
-	 * {@inheritdoc}
87
-	 */
88
-	public function unlink($path) {
89
-		if ($this->is_dir($path)) {
90
-			return $this->rmdir($path);
91
-		}
92
-		try {
93
-			return $this->flysystem->delete($this->buildPath($path));
94
-		} catch (FileNotFoundException $e) {
95
-			return false;
96
-		}
97
-	}
85
+    /**
86
+     * {@inheritdoc}
87
+     */
88
+    public function unlink($path) {
89
+        if ($this->is_dir($path)) {
90
+            return $this->rmdir($path);
91
+        }
92
+        try {
93
+            return $this->flysystem->delete($this->buildPath($path));
94
+        } catch (FileNotFoundException $e) {
95
+            return false;
96
+        }
97
+    }
98 98
 
99
-	/**
100
-	 * {@inheritdoc}
101
-	 */
102
-	public function rename($source, $target) {
103
-		if ($this->file_exists($target)) {
104
-			$this->unlink($target);
105
-		}
106
-		return $this->flysystem->rename($this->buildPath($source), $this->buildPath($target));
107
-	}
99
+    /**
100
+     * {@inheritdoc}
101
+     */
102
+    public function rename($source, $target) {
103
+        if ($this->file_exists($target)) {
104
+            $this->unlink($target);
105
+        }
106
+        return $this->flysystem->rename($this->buildPath($source), $this->buildPath($target));
107
+    }
108 108
 
109
-	/**
110
-	 * {@inheritdoc}
111
-	 */
112
-	public function copy($source, $target) {
113
-		if ($this->file_exists($target)) {
114
-			$this->unlink($target);
115
-		}
116
-		return $this->flysystem->copy($this->buildPath($source), $this->buildPath($target));
117
-	}
109
+    /**
110
+     * {@inheritdoc}
111
+     */
112
+    public function copy($source, $target) {
113
+        if ($this->file_exists($target)) {
114
+            $this->unlink($target);
115
+        }
116
+        return $this->flysystem->copy($this->buildPath($source), $this->buildPath($target));
117
+    }
118 118
 
119
-	/**
120
-	 * {@inheritdoc}
121
-	 */
122
-	public function filesize($path) {
123
-		if ($this->is_dir($path)) {
124
-			return 0;
125
-		} else {
126
-			return $this->flysystem->getSize($this->buildPath($path));
127
-		}
128
-	}
119
+    /**
120
+     * {@inheritdoc}
121
+     */
122
+    public function filesize($path) {
123
+        if ($this->is_dir($path)) {
124
+            return 0;
125
+        } else {
126
+            return $this->flysystem->getSize($this->buildPath($path));
127
+        }
128
+    }
129 129
 
130
-	/**
131
-	 * {@inheritdoc}
132
-	 */
133
-	public function mkdir($path) {
134
-		if ($this->file_exists($path)) {
135
-			return false;
136
-		}
137
-		return $this->flysystem->createDir($this->buildPath($path));
138
-	}
130
+    /**
131
+     * {@inheritdoc}
132
+     */
133
+    public function mkdir($path) {
134
+        if ($this->file_exists($path)) {
135
+            return false;
136
+        }
137
+        return $this->flysystem->createDir($this->buildPath($path));
138
+    }
139 139
 
140
-	/**
141
-	 * {@inheritdoc}
142
-	 */
143
-	public function filemtime($path) {
144
-		return $this->flysystem->getTimestamp($this->buildPath($path));
145
-	}
140
+    /**
141
+     * {@inheritdoc}
142
+     */
143
+    public function filemtime($path) {
144
+        return $this->flysystem->getTimestamp($this->buildPath($path));
145
+    }
146 146
 
147
-	/**
148
-	 * {@inheritdoc}
149
-	 */
150
-	public function rmdir($path) {
151
-		try {
152
-			return @$this->flysystem->deleteDir($this->buildPath($path));
153
-		} catch (FileNotFoundException $e) {
154
-			return false;
155
-		}
156
-	}
147
+    /**
148
+     * {@inheritdoc}
149
+     */
150
+    public function rmdir($path) {
151
+        try {
152
+            return @$this->flysystem->deleteDir($this->buildPath($path));
153
+        } catch (FileNotFoundException $e) {
154
+            return false;
155
+        }
156
+    }
157 157
 
158
-	/**
159
-	 * {@inheritdoc}
160
-	 */
161
-	public function opendir($path) {
162
-		try {
163
-			$content = $this->flysystem->listContents($this->buildPath($path));
164
-		} catch (FileNotFoundException $e) {
165
-			return false;
166
-		}
167
-		$names = array_map(function ($object) {
168
-			return $object['basename'];
169
-		}, $content);
170
-		return IteratorDirectory::wrap($names);
171
-	}
158
+    /**
159
+     * {@inheritdoc}
160
+     */
161
+    public function opendir($path) {
162
+        try {
163
+            $content = $this->flysystem->listContents($this->buildPath($path));
164
+        } catch (FileNotFoundException $e) {
165
+            return false;
166
+        }
167
+        $names = array_map(function ($object) {
168
+            return $object['basename'];
169
+        }, $content);
170
+        return IteratorDirectory::wrap($names);
171
+    }
172 172
 
173
-	/**
174
-	 * {@inheritdoc}
175
-	 */
176
-	public function fopen($path, $mode) {
177
-		$fullPath = $this->buildPath($path);
178
-		$useExisting = true;
179
-		switch ($mode) {
180
-			case 'r':
181
-			case 'rb':
182
-				try {
183
-					return $this->flysystem->readStream($fullPath);
184
-				} catch (FileNotFoundException $e) {
185
-					return false;
186
-				}
187
-			case 'w':
188
-			case 'w+':
189
-			case 'wb':
190
-			case 'wb+':
191
-				$useExisting = false;
192
-				// no break
193
-			case 'a':
194
-			case 'ab':
195
-			case 'r+':
196
-			case 'a+':
197
-			case 'x':
198
-			case 'x+':
199
-			case 'c':
200
-			case 'c+':
201
-				//emulate these
202
-				if ($useExisting and $this->file_exists($path)) {
203
-					if (!$this->isUpdatable($path)) {
204
-						return false;
205
-					}
206
-					$tmpFile = $this->getCachedFile($path);
207
-				} else {
208
-					if (!$this->isCreatable(dirname($path))) {
209
-						return false;
210
-					}
211
-					$tmpFile = \OC::$server->getTempManager()->getTemporaryFile();
212
-				}
213
-				$source = fopen($tmpFile, $mode);
214
-				return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath) {
215
-					$this->flysystem->putStream($fullPath, fopen($tmpFile, 'r'));
216
-					unlink($tmpFile);
217
-				});
218
-		}
219
-		return false;
220
-	}
173
+    /**
174
+     * {@inheritdoc}
175
+     */
176
+    public function fopen($path, $mode) {
177
+        $fullPath = $this->buildPath($path);
178
+        $useExisting = true;
179
+        switch ($mode) {
180
+            case 'r':
181
+            case 'rb':
182
+                try {
183
+                    return $this->flysystem->readStream($fullPath);
184
+                } catch (FileNotFoundException $e) {
185
+                    return false;
186
+                }
187
+            case 'w':
188
+            case 'w+':
189
+            case 'wb':
190
+            case 'wb+':
191
+                $useExisting = false;
192
+                // no break
193
+            case 'a':
194
+            case 'ab':
195
+            case 'r+':
196
+            case 'a+':
197
+            case 'x':
198
+            case 'x+':
199
+            case 'c':
200
+            case 'c+':
201
+                //emulate these
202
+                if ($useExisting and $this->file_exists($path)) {
203
+                    if (!$this->isUpdatable($path)) {
204
+                        return false;
205
+                    }
206
+                    $tmpFile = $this->getCachedFile($path);
207
+                } else {
208
+                    if (!$this->isCreatable(dirname($path))) {
209
+                        return false;
210
+                    }
211
+                    $tmpFile = \OC::$server->getTempManager()->getTemporaryFile();
212
+                }
213
+                $source = fopen($tmpFile, $mode);
214
+                return CallbackWrapper::wrap($source, null, null, function () use ($tmpFile, $fullPath) {
215
+                    $this->flysystem->putStream($fullPath, fopen($tmpFile, 'r'));
216
+                    unlink($tmpFile);
217
+                });
218
+        }
219
+        return false;
220
+    }
221 221
 
222
-	/**
223
-	 * {@inheritdoc}
224
-	 */
225
-	public function touch($path, $mtime = null) {
226
-		if ($this->file_exists($path)) {
227
-			return false;
228
-		} else {
229
-			$this->file_put_contents($path, '');
230
-			return true;
231
-		}
232
-	}
222
+    /**
223
+     * {@inheritdoc}
224
+     */
225
+    public function touch($path, $mtime = null) {
226
+        if ($this->file_exists($path)) {
227
+            return false;
228
+        } else {
229
+            $this->file_put_contents($path, '');
230
+            return true;
231
+        }
232
+    }
233 233
 
234
-	/**
235
-	 * {@inheritdoc}
236
-	 */
237
-	public function stat($path) {
238
-		$info = $this->flysystem->getWithMetadata($this->buildPath($path), ['timestamp', 'size']);
239
-		return [
240
-			'mtime' => $info['timestamp'],
241
-			'size' => $info['size']
242
-		];
243
-	}
234
+    /**
235
+     * {@inheritdoc}
236
+     */
237
+    public function stat($path) {
238
+        $info = $this->flysystem->getWithMetadata($this->buildPath($path), ['timestamp', 'size']);
239
+        return [
240
+            'mtime' => $info['timestamp'],
241
+            'size' => $info['size']
242
+        ];
243
+    }
244 244
 
245
-	/**
246
-	 * {@inheritdoc}
247
-	 */
248
-	public function filetype($path) {
249
-		if ($path === '' or $path === '/' or $path === '.') {
250
-			return 'dir';
251
-		}
252
-		try {
253
-			$info = $this->flysystem->getMetadata($this->buildPath($path));
254
-		} catch (FileNotFoundException $e) {
255
-			return false;
256
-		}
257
-		return $info['type'];
258
-	}
245
+    /**
246
+     * {@inheritdoc}
247
+     */
248
+    public function filetype($path) {
249
+        if ($path === '' or $path === '/' or $path === '.') {
250
+            return 'dir';
251
+        }
252
+        try {
253
+            $info = $this->flysystem->getMetadata($this->buildPath($path));
254
+        } catch (FileNotFoundException $e) {
255
+            return false;
256
+        }
257
+        return $info['type'];
258
+    }
259 259
 }
Please login to merge, or discard this patch.
lib/public/UserInterface.php 1 patch
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -40,69 +40,69 @@
 block discarded – undo
40 40
  */
41 41
 interface UserInterface {
42 42
 
43
-	/**
44
-	 * Check if backend implements actions
45
-	 * @param int $actions bitwise-or'ed actions
46
-	 * @return boolean
47
-	 *
48
-	 * Returns the supported actions as int to be
49
-	 * compared with \OC\User\Backend::CREATE_USER etc.
50
-	 * @since 4.5.0
51
-	 * @deprecated 14.0.0 Switch to the interfaces from OCP\User\Backend
52
-	 */
53
-	public function implementsActions($actions);
43
+    /**
44
+     * Check if backend implements actions
45
+     * @param int $actions bitwise-or'ed actions
46
+     * @return boolean
47
+     *
48
+     * Returns the supported actions as int to be
49
+     * compared with \OC\User\Backend::CREATE_USER etc.
50
+     * @since 4.5.0
51
+     * @deprecated 14.0.0 Switch to the interfaces from OCP\User\Backend
52
+     */
53
+    public function implementsActions($actions);
54 54
 
55
-	/**
56
-	 * delete a user
57
-	 * @param string $uid The username of the user to delete
58
-	 * @return bool
59
-	 * @since 4.5.0
60
-	 */
61
-	public function deleteUser($uid);
55
+    /**
56
+     * delete a user
57
+     * @param string $uid The username of the user to delete
58
+     * @return bool
59
+     * @since 4.5.0
60
+     */
61
+    public function deleteUser($uid);
62 62
 
63
-	/**
64
-	 * Get a list of all users
65
-	 *
66
-	 * @param string $search
67
-	 * @param null|int $limit
68
-	 * @param null|int $offset
69
-	 * @return string[] an array of all uids
70
-	 * @since 4.5.0
71
-	 */
72
-	public function getUsers($search = '', $limit = null, $offset = null);
63
+    /**
64
+     * Get a list of all users
65
+     *
66
+     * @param string $search
67
+     * @param null|int $limit
68
+     * @param null|int $offset
69
+     * @return string[] an array of all uids
70
+     * @since 4.5.0
71
+     */
72
+    public function getUsers($search = '', $limit = null, $offset = null);
73 73
 
74
-	/**
75
-	 * check if a user exists
76
-	 * @param string $uid the username
77
-	 * @return boolean
78
-	 * @since 4.5.0
79
-	 */
80
-	public function userExists($uid);
74
+    /**
75
+     * check if a user exists
76
+     * @param string $uid the username
77
+     * @return boolean
78
+     * @since 4.5.0
79
+     */
80
+    public function userExists($uid);
81 81
 
82
-	/**
83
-	 * get display name of the user
84
-	 * @param string $uid user ID of the user
85
-	 * @return string display name
86
-	 * @since 4.5.0
87
-	 */
88
-	public function getDisplayName($uid);
82
+    /**
83
+     * get display name of the user
84
+     * @param string $uid user ID of the user
85
+     * @return string display name
86
+     * @since 4.5.0
87
+     */
88
+    public function getDisplayName($uid);
89 89
 
90
-	/**
91
-	 * Get a list of all display names and user ids.
92
-	 *
93
-	 * @param string $search
94
-	 * @param string|null $limit
95
-	 * @param string|null $offset
96
-	 * @return array an array of all displayNames (value) and the corresponding uids (key)
97
-	 * @since 4.5.0
98
-	 */
99
-	public function getDisplayNames($search = '', $limit = null, $offset = null);
90
+    /**
91
+     * Get a list of all display names and user ids.
92
+     *
93
+     * @param string $search
94
+     * @param string|null $limit
95
+     * @param string|null $offset
96
+     * @return array an array of all displayNames (value) and the corresponding uids (key)
97
+     * @since 4.5.0
98
+     */
99
+    public function getDisplayNames($search = '', $limit = null, $offset = null);
100 100
 
101
-	/**
102
-	 * Check if a user list is available or not
103
-	 * @return boolean if users can be listed or not
104
-	 * @since 4.5.0
105
-	 */
106
-	public function hasUserListings();
101
+    /**
102
+     * Check if a user list is available or not
103
+     * @return boolean if users can be listed or not
104
+     * @since 4.5.0
105
+     */
106
+    public function hasUserListings();
107 107
 
108 108
 }
Please login to merge, or discard this patch.
apps/user_ldap/ajax/getConfiguration.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 \OC_JSON::checkAppEnabled('user_ldap');
30 30
 \OC_JSON::callCheck();
31 31
 
32
-$prefix = (string)$_POST['ldap_serverconfig_chooser'];
32
+$prefix = (string) $_POST['ldap_serverconfig_chooser'];
33 33
 $ldapWrapper = new OCA\User_LDAP\LDAP();
34 34
 $connection = new \OCA\User_LDAP\Connection($ldapWrapper, $prefix);
35 35
 $configuration = $connection->getConfiguration();
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 $connection = new \OCA\User_LDAP\Connection($ldapWrapper, $prefix);
36 36
 $configuration = $connection->getConfiguration();
37 37
 if (isset($configuration['ldap_agent_password']) && $configuration['ldap_agent_password'] !== '') {
38
-	// hide password
39
-	$configuration['ldap_agent_password'] = '**PASSWORD SET**';
38
+    // hide password
39
+    $configuration['ldap_agent_password'] = '**PASSWORD SET**';
40 40
 }
41 41
 \OC_JSON::success(['configuration' => $configuration]);
Please login to merge, or discard this patch.
lib/public/User/Backend/ISetPasswordBackend.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@
 block discarded – undo
29 29
  */
30 30
 interface ISetPasswordBackend {
31 31
 
32
-	/**
33
-	 * @since 14.0.0
34
-	 *
35
-	 * @param string $uid The username
36
-	 * @param string $password The new password
37
-	 * @return bool
38
-	 */
39
-	public function setPassword(string $uid, string $password): bool;
32
+    /**
33
+     * @since 14.0.0
34
+     *
35
+     * @param string $uid The username
36
+     * @param string $password The new password
37
+     * @return bool
38
+     */
39
+    public function setPassword(string $uid, string $password): bool;
40 40
 }
Please login to merge, or discard this patch.