Completed
Push — master ( 7e776b...c46311 )
by Sander
05:23 queued 02:54
created
controller/credentialcontroller.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@  discard block
 block discarded – undo
11 11
 
12 12
 namespace OCA\Passman\Controller;
13 13
 
14
-use OCA\Files_External\NotFoundException;
15 14
 use OCA\Passman\Db\SharingACL;
16 15
 use OCA\Passman\Utility\NotFoundJSONResponse;
17 16
 use OCP\AppFramework\Db\DoesNotExistException;
@@ -25,7 +24,6 @@  discard block
 block discarded – undo
25 24
 use OCA\Passman\Service\ActivityService;
26 25
 use OCA\Passman\Service\CredentialRevisionService;
27 26
 use OCA\Passman\Service\ShareService;
28
-use OCP\IUser;
29 27
 
30 28
 class CredentialController extends ApiController {
31 29
 	private $userId;
Please login to merge, or discard this patch.
controller/sharecontroller.php 1 patch
Unused Use Statements   -8 removed lines patch added patch discarded remove patch
@@ -11,10 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 namespace OCA\Passman\Controller;
13 13
 
14
-use OCA\Files_External\NotFoundException;
15
-use OCA\Passman\Db\ShareRequest;
16 14
 use OCA\Passman\Db\SharingACL;
17
-use OCA\Passman\Db\Vault;
18 15
 use OCA\Passman\Service\CredentialService;
19 16
 use OCA\Passman\Service\FileService;
20 17
 use OCA\Passman\Service\NotificationService;
@@ -26,14 +23,9 @@  discard block
 block discarded – undo
26 23
 use OCP\IRequest;
27 24
 use OCP\AppFramework\Http\JSONResponse;
28 25
 use OCP\AppFramework\ApiController;
29
-use OCP\AppFramework\Http;
30
-use OCP\AppFramework\Http\DataResponse;
31
-
32
-use OCP\IGroup;
33 26
 use OCP\IGroupManager;
34 27
 use OCP\IUserManager;
35 28
 use OCP\IUser;
36
-
37 29
 use OCA\Passman\Service\VaultService;
38 30
 use OCA\Passman\Service\ActivityService;
39 31
 use OCA\Passman\Activity;
Please login to merge, or discard this patch.
lib/AppInfo/Application.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@  discard block
 block discarded – undo
11 11
 
12 12
 namespace OCA\Passman\AppInfo;
13 13
 use OC\Files\View;
14
-
15 14
 use OCA\Passman\Controller\CredentialController;
16 15
 use OCA\Passman\Controller\PageController;
17 16
 use OCA\Passman\Controller\ShareController;
@@ -24,10 +23,8 @@  discard block
 block discarded – undo
24 23
 use OCA\Passman\Service\VaultService;
25 24
 use OCA\Passman\Utility\Utils;
26 25
 use OCA\Passman\Service\NotificationService;
27
-
28 26
 use OCP\AppFramework\App;
29 27
 use OCP\IL10N;
30
-use OCP\Util;
31 28
 class Application extends App {
32 29
 	public function __construct () {
33 30
 		parent::__construct('passman');
Please login to merge, or discard this patch.
lib/Db/SharingACL.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 namespace OCA\Passman\Db;
9 9
 
10 10
 use OCA\Passman\Utility\PermissionEntity;
11
-use OCP\AppFramework\Db\Entity;
12 11
 
13 12
 /**
14 13
  * @method void setId(integer $value)
Please login to merge, or discard this patch.
lib/Service/CredentialService.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -14,9 +14,7 @@
 block discarded – undo
14 14
 use OCA\Passman\Db\Credential;
15 15
 use OCA\Passman\Db\SharingACL;
16 16
 use OCA\Passman\Db\SharingACLMapper;
17
-use OCP\IConfig;
18 17
 use OCP\AppFramework\Db\DoesNotExistException;
19
-
20 18
 use OCA\Passman\Db\CredentialMapper;
21 19
 
22 20
 
Please login to merge, or discard this patch.
lib/Service/NotificationService.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -11,9 +11,6 @@
 block discarded – undo
11 11
 
12 12
 namespace OCA\Passman\Service;
13 13
 
14
-use OCP\IConfig;
15
-use OCP\AppFramework\Db\DoesNotExistException;
16
-
17 14
 use OCA\Passman\Db\FileMapper;
18 15
 
19 16
 
Please login to merge, or discard this patch.
lib/Service/ShareService.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,6 +49,7 @@  discard block
 block discarded – undo
49 49
 	 * @param $target_item_guid string      The shared item GUID
50 50
 	 * @param $request_array    array
51 51
 	 * @param $permissions      integer     Must be created with a bitmask from options on the ShareRequest class
52
+	 * @param string $credential_owner
52 53
 	 * @return array                        Array of sharing requests
53 54
 	 */
54 55
 	public function createBulkRequests($target_item_id, $target_item_guid, $request_array, $permissions, $credential_owner) {
@@ -253,7 +254,6 @@  discard block
 block discarded – undo
253 254
 	/**
254 255
 	 * Delete ACL
255 256
 	 *
256
-	 * @param  ShareRequest $request
257 257
 	 * @return \OCA\Passman\Db\ShareRequest[]
258 258
 	 */
259 259
 	public function deleteShareACL(SharingACL $ACL) {
@@ -277,7 +277,6 @@  discard block
 block discarded – undo
277 277
 	/**
278 278
 	 * Get pending share requests by guid and uid
279 279
 	 *
280
-	 * @param  ShareRequest $request
281 280
 	 * @return \OCA\Passman\Db\ShareRequest[]
282 281
 	 */
283 282
 	public function getPendingShareRequestsForCredential($item_guid, $user_id) {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 namespace OCA\Passman\Service;
10 10
 
11 11
 
12
-use Icewind\SMB\Share;
13 12
 use OCA\Passman\Db\CredentialMapper;
14 13
 use OCA\Passman\Db\CredentialRevision;
15 14
 use OCA\Passman\Db\ShareRequest;
Please login to merge, or discard this patch.
lib/Db/ShareRequest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 namespace OCA\Passman\Db;
9 9
 
10 10
 use OCA\Passman\Utility\PermissionEntity;
11
-use OCP\AppFramework\Db\Entity;
12 11
 
13 12
 /**
14 13
  * @method void setId(integer $value)
Please login to merge, or discard this patch.
lib/Db/CredentialMapper.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -25,6 +25,7 @@  discard block
 block discarded – undo
25 25
 	/**
26 26
 	 * @throws \OCP\AppFramework\Db\DoesNotExistException if not found
27 27
 	 * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException if more than one result
28
+	 * @param integer $vault_id
28 29
 	 */
29 30
 	public function getCredentialsByVaultId($vault_id, $user_id) {
30 31
 		$sql = 'SELECT * FROM `*PREFIX*passman_credentials` ' .
@@ -32,12 +33,18 @@  discard block
 block discarded – undo
32 33
 		return $this->findEntities($sql, [$user_id, $vault_id]);
33 34
 	}
34 35
 
36
+	/**
37
+	 * @param integer $vault_id
38
+	 */
35 39
 	public function getRandomCredentialByVaultId($vault_id, $user_id) {
36 40
 		$sql = 'SELECT * FROM `*PREFIX*passman_credentials` ' .
37 41
 			'WHERE `user_id` = ? and vault_id = ? AND shared_key is NULL ORDER BY RAND() LIMIT 1';
38 42
 		return $this->findEntities($sql, [$user_id, $vault_id]);
39 43
 	}
40 44
 
45
+	/**
46
+	 * @param integer $timestamp
47
+	 */
41 48
 	public function getExpiredCredentials($timestamp){
42 49
 		$sql = 'SELECT * FROM `*PREFIX*passman_credentials` ' .
43 50
 			'WHERE `expire_time` > 0 AND `expire_time` < ?';
@@ -61,6 +68,9 @@  discard block
 block discarded – undo
61 68
 		return $this->findEntity($sql,$params);
62 69
 	}
63 70
 
71
+	/**
72
+	 * @param integer $credential_id
73
+	 */
64 74
 	public function getCredentialLabelById($credential_id){
65 75
 		$sql = 'SELECT id, label FROM `*PREFIX*passman_credentials` ' .
66 76
 			'WHERE `id` = ? ';
Please login to merge, or discard this patch.