Code Duplication    Length = 10-10 lines in 2 locations

Sources/CacheAPI-smf.php 1 location

@@ 185-194 (lines=10) @@
182
	 * @param string $dir A valid path
183
	 * @return boolean If this was successful or not.
184
	 */
185
	public function setCachedir($dir = null)
186
	{
187
		global $cachedir;
188
189
		// If its invalid, use SMF's.
190
		if (is_null($dir) || !is_writable($dir))
191
			$this->cachedir = $cachedir;
192
		else
193
			$this->cachedir = $dir;
194
	}
195
196
	/**
197
	 * Gets the current $cachedir.

Sources/CacheAPI-sqlite.php 1 location

@@ 148-157 (lines=10) @@
145
	 *
146
	 * @return boolean If this was successful or not.
147
	 */
148
	public function setCachedir($dir = null)
149
	{
150
		global $cachedir_sqlite;
151
152
		// If its invalid, use SMF's.
153
		if (is_null($dir) || !is_writable($dir))
154
		{
155
			$this->cachedir = $cachedir_sqlite;
156
		}
157
		else
158
		{
159
			$this->cachedir = $dir;
160
		}