Completed
Pull Request — master (#822)
by
unknown
19:08
created

OtoConfirmationService::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
 namespace OCA\Calendar\Service;
3
4
 use Exception;
5
6
 use OCP\AppFramework\Http;
7
 use OCP\AppFramework\Db\DoesNotExistException;
8
 use OCP\AppFramework\Db\MultipleObjectsReturnedException;
9
10
 use OCA\Calendar\Db\OtoConfirmation;
11
 use OCA\Calendar\Db\OtoConfirmationMapper;
12
 
13
 class OtoConfirmationService {
14
	
15
	private $mapper;
16
	/**
17
     * @NoAdminRequired
18
	 * @param string $appName
0 ignored issues
show
Bug introduced by
There is no parameter named $appName. 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...
19
	 * @param IRequest $request an instance of the request
0 ignored issues
show
Bug introduced by
There is no parameter named $request. 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...
20
	 * @param OtoConfirmationMapper $mapper the db mapper
21
	 */
22
     public function __construct(OtoConfirmationMapper $mapper){
23
		 $this->mapper = $mapper;
24
     }
25
	 /**
26
	 *
27
     * @NoAdminRequired
28
	 * @NoCSRFRequired
29
	 *
30
	 * @throws \OCP\AppFramework\Db\DoesNotExistException if not found
31
     * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException if more than one result
32
	 * @param integer $otoLayerId
0 ignored issues
show
Bug introduced by
There is no parameter named $otoLayerId. 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...
33
	 * @param string $password
0 ignored issues
show
Bug introduced by
There is no parameter named $password. 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...
34
	 */
35
	 public function getConfirmationsByUser($userId){
36
		$foo =  $this->mapper->getConfirmationsForUser($userId);
37
		return($foo);
38
	 }
39
	 /**
40
     * @NoAdminRequired
41
	 */
42
	 public function deleteConfirmationsByOtoLayer($otoLayerId){
43
		$this->mapper->deleteConfirmationsByOtoLayer($otoLayerId);
44
	 }
45
	 /**
46
     * @NoAdminRequired
47
	 */
48
	 public function deleteBySourceId($sourceId,$userId){
49
		$this->mapper->deleteBySourceId($sourceId,$userId);
50
	 }
51
 }