Code Duplication    Length = 8-8 lines in 2 locations

cloudcontrol/library/search/SearchDbConnected.php 1 location

@@ 69-76 (lines=8) @@
66
		return !empty($result);
67
	}
68
69
	protected function getSearchDbHandle()
70
	{
71
		if ($this->searchDbHandle === null) {
72
			$path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $this->storageDir . DIRECTORY_SEPARATOR;
73
			$this->searchDbHandle = new \PDO('sqlite:' . $path . 'search.db');
74
		}
75
		return $this->searchDbHandle;
76
	}
77
}

cloudcontrol/library/search/Indexer.php 1 location

@@ 173-180 (lines=8) @@
170
	 * exist and returns it.
171
	 * @return \PDO
172
	 */
173
	protected function getSearchDbHandle()
174
	{
175
		if ($this->searchDbHandle === null) {
176
			$path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $this->storageDir . DIRECTORY_SEPARATOR;
177
			$this->searchDbHandle = new \PDO('sqlite:' . $path . self::SEARCH_TEMP_DB);
178
		}
179
		return $this->searchDbHandle;
180
	}
181
182
	/**
183
	 * Replaces the old search index database with the new one.