Completed
Push — master ( 2566be...2cb116 )
by Maxence
01:40 queued 10s
created

SettingsService   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 39
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A checkConfig() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
5
/**
6
 * FullTextSearch_Elasticsearch - Use Elasticsearch to index the content of your nextcloud
7
 *
8
 * This file is licensed under the Affero General Public License version 3 or
9
 * later. See the COPYING file.
10
 *
11
 * @author Maxence Lange <[email protected]>
12
 * @copyright 2018
13
 * @license GNU AGPL version 3 or any later version
14
 *
15
 * This program is free software: you can redistribute it and/or modify
16
 * it under the terms of the GNU Affero General Public License as
17
 * published by the Free Software Foundation, either version 3 of the
18
 * License, or (at your option) any later version.
19
 *
20
 * This program is distributed in the hope that it will be useful,
21
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
 * GNU Affero General Public License for more details.
24
 *
25
 * You should have received a copy of the GNU Affero General Public License
26
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
27
 *
28
 */
29
30
31
namespace OCA\FullTextSearch_Elasticsearch\Service;
32
33
34
use OCP\IConfig;
35
36
37
/**
38
 * Class SettingsService
39
 *
40
 * @package OCA\FullTextSearch_Elasticsearch\Service
41
 */
42
class SettingsService {
43
44
45
	/** @var IConfig */
46
	private $config;
47
48
	/** @var string */
49
	private $userId;
50
51
	/** @var MiscService */
52
	private $miscService;
53
54
55
	/**
56
	 * SettingsService constructor.
57
	 *
58
	 * @param IConfig $config
59
	 * @param string $userId
60
	 * @param MiscService $miscService
61
	 */
62
	public function __construct(IConfig $config, $userId, MiscService $miscService) {
63
		$this->config = $config;
64
		$this->userId = $userId;
65
		$this->miscService = $miscService;
66
	}
67
68
	/**
69
	 * @param array $data
70
	 *
71
	 * @return bool
72
	 */
73
	public function checkConfig(array $data) {
0 ignored issues
show
Unused Code introduced by
The parameter $data is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
74
//			return false;
75
76
		return true;
77
	}
78
79
80
}
81
82