Completed
Pull Request — master (#822)
by
unknown
20:37
created

OtoLayerService::passwordCheck()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
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\OtoLayer;
11
 use OCA\Calendar\Db\OtoLayerMapper;
12
 
13
 class OtoLayerService {
14
	
15
	private $mapper;
16
	/**
17
	 * @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...
18
	 * @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...
19
	 * @param OtoLayerMapper $mapper the dbo mapper
20
	 */
21
     public function __construct(OtoLayerMapper $mapper){
22
		 $this->mapper = $mapper;
23
     }
24
	 /**
25
	 * @NoCSRFRequired
26
	 *
27
	 * @throws \OCP\AppFramework\Db\DoesNotExistException if not found
28
     * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException if more than one result
29
	 * @param integer $otoLayerId
30
	 * @param string $password
31
	 */
32
	 public function passwordCheck($otoLayerId, $password){
33
		$isVerified = $this->mapper->passwordCheck($otoLayerId, $password);
34
		return $isVerified;
35
	 }
36
	 
37
	 public function deleteLayer($otoLayerId){
38
		$this->mapper->deleteLayer($otoLayerId);
39
	 }
40
	 
41
	 public function deleteBySourceId($sourceId,$userId){
42
		$this->mapper->deleteBySourceId($sourceId,$userId);
43
	 }
44
	 
45
	 public function findUserLayers($userId){
46
		$this->mapper->findUserLayers($userId);
47
	 }
48
 }