Code Duplication    Length = 8-8 lines in 2 locations

cloudcontrol/library/search/Indexer.php 1 location

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

cloudcontrol/library/search/SearchDbConnected.php 1 location

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