Completed
Pull Request — master (#1523)
by
unknown
09:53
created

AliasesController::show()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
/**
3
 * @author Tahaa Karim <[email protected]>
4
 *
5
 * ownCloud - Mail
6
 *
7
 * This code is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU Affero General Public License, version 3,
9
 * as published by the Free Software Foundation.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
 * GNU Affero General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU Affero General Public License, version 3,
17
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
18
 *
19
 */
20
21
namespace OCA\Mail\Controller;
22
23
use OCP\IRequest;
24
use OCA\Mail\Service\AliasesService;
25
use OCP\AppFramework\Controller;
26
use OCP\AppFramework\Db\DoesNotExistException;
27
use OCP\AppFramework\Http\JSONResponse;
28
use OCP\AppFramework\Http;
29
30
class AliasesController extends Controller {
31
32
	/** @var AliasesService */
33
	private $aliasService;
34
35
	/**
36
	 * @var string
37
	 */
38
	private $currentUserId;
39
40
	/**
41
	 * @param string $appName
42
	 * @param IRequest $request
43
	 * @param AliasesService $AliasService
0 ignored issues
show
Bug introduced by
There is no parameter named $AliasService. Was it maybe removed?

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 $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
44
	 * @param $UserId
45
	 */
46
	public function __construct($appName, IRequest $request, AliasesService $aliasesService, $UserId) {
47
		parent::__construct($appName, $request);
48
		$this->aliasService = $aliasesService;
49
		$this->currentUserId = $UserId;
50
	}
51
52
	/**
53
	 * @NoAdminRequired
54
	 * @NoCSRFRequired
55
	 * @param int $accountId
56
	 */
57
	public function index($accountId) {
58
		// return all aliases
59
	}
60
61
	/**
62
	 * @NoAdminRequired
63
	 * @NoCSRFRequired
64
	 */
65
	public function show() {
66
		$response = new JSONResponse();
67
		$response->setStatus(Http::STATUS_NOT_IMPLEMENTED);
68
		return $response;
69
	}
70
71
	/**
72
	 * @NoAdminRequired
73
	 * @NoCSRFRequired
74
	 * @param int $accountId
0 ignored issues
show
Bug introduced by
There is no parameter named $accountId. Was it maybe removed?

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 $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
75
	 */
76
	public function update() {
77
		//update an alias
78
	}
79
80
	/**
81
	 * @NoAdminRequired
82
	 * @NoCSRFRequired
83
	 * @param int $accountId
0 ignored issues
show
Bug introduced by
There is no parameter named $accountId. Was it maybe removed?

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 $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
84
	 */
85
	public function destroy() {
86
		// remove aliases
87
	}
88
89
	/**
90
	 * @NoAdminRequired
91
	 * @NoCSRFRequired
92
	 * @param int $accountId
93
	 */
94
	public function create($accountId) {
95
		// create an alias
96
		
97
	}
98
}
99