|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* Circles - Bring cloud-users closer together. |
|
5
|
|
|
* |
|
6
|
|
|
* This file is licensed under the Affero General Public License version 3 or |
|
7
|
|
|
* later. See the COPYING file. |
|
8
|
|
|
* |
|
9
|
|
|
* @author Maxence Lange <[email protected]> |
|
10
|
|
|
* @copyright 2017 |
|
11
|
|
|
* @license GNU AGPL version 3 or any later version |
|
12
|
|
|
* |
|
13
|
|
|
* This program is free software: you can redistribute it and/or modify |
|
14
|
|
|
* it under the terms of the GNU Affero General Public License as |
|
15
|
|
|
* published by the Free Software Foundation, either version 3 of the |
|
16
|
|
|
* License, or (at your option) any later version. |
|
17
|
|
|
* |
|
18
|
|
|
* This program is distributed in the hope that it will be useful, |
|
19
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21
|
|
|
* GNU Affero General Public License for more details. |
|
22
|
|
|
* |
|
23
|
|
|
* You should have received a copy of the GNU Affero General Public License |
|
24
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
25
|
|
|
* |
|
26
|
|
|
*/ |
|
27
|
|
|
|
|
28
|
|
|
namespace OCA\Circles\Db; |
|
29
|
|
|
|
|
30
|
|
|
|
|
31
|
|
|
use Doctrine\DBAL\Query\QueryBuilder; |
|
32
|
|
|
use OCA\Circles\Exceptions\ConfigNoCircleAvailableException; |
|
33
|
|
|
use OCA\Circles\Model\Circle; |
|
34
|
|
|
use OCA\Circles\Model\Member; |
|
35
|
|
|
use OCA\Circles\Model\SharingFrame; |
|
36
|
|
|
use OCA\Circles\Service\ConfigService; |
|
37
|
|
|
use OCA\Circles\Service\MiscService; |
|
38
|
|
|
use OCP\DB\QueryBuilder\IQueryBuilder; |
|
39
|
|
|
use OCP\IDBConnection; |
|
40
|
|
|
use OCP\IL10N; |
|
41
|
|
|
|
|
42
|
|
|
class SharesRequestBuilder extends CoreRequestBuilder { |
|
43
|
|
|
|
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* SharesRequestBuilder constructor. |
|
47
|
|
|
* |
|
48
|
|
|
* {@inheritdoc} |
|
49
|
|
|
* @param MembersRequest $membersRequest |
|
|
|
|
|
|
50
|
|
|
*/ |
|
51
|
|
|
public function __construct( |
|
52
|
|
|
IL10N $l10n, IDBConnection $connection, ConfigService $configService, |
|
53
|
|
|
MiscService $miscService |
|
54
|
|
|
) { |
|
55
|
|
|
parent::__construct($l10n, $connection, $configService, $miscService); |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* Base of the Sql Delete request |
|
61
|
|
|
* |
|
62
|
|
|
* @return IQueryBuilder |
|
63
|
|
|
*/ |
|
64
|
|
View Code Duplication |
protected function getSharesDeleteSql() { |
|
|
|
|
|
|
65
|
|
|
$qb = $this->dbConnection->getQueryBuilder(); |
|
66
|
|
|
$qb->delete(self::TABLE_FILE_SHARES); |
|
67
|
|
|
$qb->where( |
|
68
|
|
|
$qb->expr() |
|
69
|
|
|
->eq('share_type', $qb->createNamedParameter(self::SHARE_TYPE)) |
|
70
|
|
|
); |
|
71
|
|
|
|
|
72
|
|
|
return $qb; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
|
|
76
|
|
|
} |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.