Completed
Pull Request — master (#754)
by Julius
02:20
created
lib/Controller/DocumentController.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -11,10 +11,8 @@
 block discarded – undo
11 11
 
12 12
 namespace OCA\Richdocuments\Controller;
13 13
 
14
-use OCA\Richdocuments\Db\WopiMapper;
15 14
 use OCA\Richdocuments\Service\FederationService;
16 15
 use OCA\Richdocuments\TokenManager;
17
-use OCA\Richdocuments\WOPI\Parser;
18 16
 use \OCP\AppFramework\Controller;
19 17
 use OCP\AppFramework\Http;
20 18
 use OCP\AppFramework\Http\JSONResponse;
Please login to merge, or discard this patch.
lib/Controller/FederationController.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -26,11 +26,8 @@
 block discarded – undo
26 26
 use \OCP\AppFramework\OCSController;
27 27
 use OCA\Richdocuments\Db\WopiMapper;
28 28
 use OCP\AppFramework\Http\DataResponse;
29
-use OCP\AppFramework\OCS\OCSNotFoundException;
30
-use OCP\Files\NotFoundException;
31 29
 use OCP\IConfig;
32 30
 use OCP\IRequest;
33
-use OCP\Share\Exceptions\ShareNotFound;
34 31
 use OCP\Share\IManager;
35 32
 
36 33
 class FederationController extends OCSController {
Please login to merge, or discard this patch.
lib/Service/FederationService.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -126,6 +126,7 @@
 block discarded – undo
126 126
 
127 127
 	/**
128 128
 	 * @param File $item
129
+	 * @param \OCA\Richdocuments\Db\Direct $direct
129 130
 	 * @return string|null
130 131
 	 * @throws NotFoundException
131 132
 	 * @throws InvalidPathException
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@
 block discarded – undo
27 27
 use OCA\Federation\TrustedServers;
28 28
 use OCA\Files_Sharing\External\Storage as SharingExternalStorage;
29 29
 use OCA\Richdocuments\TokenManager;
30
-use OCP\AppFramework\Http\RedirectResponse;
31 30
 use OCP\AppFramework\QueryException;
32 31
 use OCP\Files\File;
33 32
 use OCP\Files\InvalidPathException;
Please login to merge, or discard this patch.
lib/AppConfig.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,9 @@  discard block
 block discarded – undo
40 40
 		$this->config = $config;
41 41
 	}
42 42
 
43
+	/**
44
+	 * @return string
45
+	 */
43 46
 	public function getAppNamespace($key) {
44 47
 		if (strpos($key, 'watermark_') === 0) {
45 48
 			return self::WATERMARK_APP_NAMESPACE;
@@ -61,7 +64,7 @@  discard block
 block discarded – undo
61 64
 	}
62 65
 
63 66
 	/**
64
-	 * @param $key
67
+	 * @param string $key
65 68
 	 * @return array
66 69
 	 */
67 70
 	public function getAppValueArray($key) {
Please login to merge, or discard this patch.
lib/Controller/WopiController.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -215,6 +215,9 @@  discard block
 block discarded – undo
215 215
 		return new JSONResponse($response);
216 216
 	}
217 217
 
218
+	/**
219
+	 * @param Wopi $wopi
220
+	 */
218 221
 	private function setFederationFileInfo($wopi, $response) {
219 222
 		$remoteUserId = $wopi->getGuestDisplayname();
220 223
 		$cloudID = \OC::$server->getCloudIdManager()->resolveCloudId($remoteUserId);
@@ -235,6 +238,10 @@  discard block
 block discarded – undo
235 238
 		return $response;
236 239
 	}
237 240
 
241
+	/**
242
+	 * @param boolean $isPublic
243
+	 * @param string $userId
244
+	 */
238 245
 	private function shouldWatermark($isPublic, $userId, $fileId, Wopi $wopi) {
239 246
 		if ($this->config->getAppValue(AppConfig::WATERMARK_APP_NAMESPACE, 'watermark_enabled', 'no') === 'no') {
240 247
 			return false;
Please login to merge, or discard this patch.
lib/Preview/Office.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
21 21
  */
22 22
 namespace OCA\Richdocuments\Preview;
23 23
 
24
-use GuzzleHttp\Psr7\LimitStream;
25 24
 use function GuzzleHttp\Psr7\stream_for;
26 25
 use OC\Preview\Provider;
27 26
 use OCA\Richdocuments\Capabilities;
Please login to merge, or discard this patch.
tests/features/bootstrap/FeatureContext.php 2 patches
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -255,6 +255,11 @@  discard block
 block discarded – undo
255 255
     	return $this->davPath . '/files/' . $user;
256 256
 	}
257 257
 
258
+	/**
259
+	 * @param string $user
260
+	 * @param string $method
261
+	 * @param string $path
262
+	 */
258 263
 	public function makeDavRequest($user, $method, $path, $headers, $body = null) {
259 264
     	$fullUrl = $this->baseUrl . $this->getDavFilesPath($user) . "$path";
260 265
 
@@ -281,7 +286,6 @@  discard block
 block discarded – undo
281 286
 
282 287
 	/**
283 288
 	 * @Given Using web as guest
284
-	 * @param string $user
285 289
 	 */
286 290
 	public function usingWebasGuest() {
287 291
 		return $this->loggingInUsingWebAs(null);
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 require __DIR__ . '/../../vendor/autoload.php';
3 3
 
4 4
 use Behat\Behat\Context\Context;
5
-use Behat\Gherkin\Node\PyStringNode;
6
-use Behat\Gherkin\Node\TableNode;
7 5
 use GuzzleHttp\Client;
8 6
 use GuzzleHttp\Psr7\Response;
9 7
 use Sabre\DAV\Client as SabreClient;
Please login to merge, or discard this patch.
tests/features/bootstrap/UserTrait.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -77,6 +77,9 @@
 block discarded – undo
77 77
 		$this->assertStatusCode($response, 200);
78 78
 	}
79 79
 
80
+	/**
81
+	 * @param string $user
82
+	 */
80 83
 	private function userExists($user) {
81 84
 		$client = new Client();
82 85
 		$options = [
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,6 @@
 block discarded – undo
22 22
  */
23 23
 
24 24
 use GuzzleHttp\Client;
25
-use GuzzleHttp\Cookie\CookieJar;
26
-use GuzzleHttp\Message\ResponseInterface;
27 25
 
28 26
 trait UserTrait {
29 27
 
Please login to merge, or discard this patch.