Code Duplication    Length = 9-9 lines in 2 locations

application/models/Site_Model.php 2 locations

@@ 217-225 (lines=9) @@
214
		return $success;
215
	}
216
217
	public function getChapterData(string $title_string, string $chapter) : array {
218
		//$title_string isn't used here.
219
220
		$chapter_parts = explode(':--:', $chapter);
221
		return [
222
			'url'    => "http://bato.to/reader#" . $chapter_parts[0],
223
			'number' => $chapter_parts[1]
224
		];
225
	}
226
227
	public function getTitleData(string $title_string) {
228
		$title_parts = explode(':--:', $title_string);
@@ 614-622 (lines=9) @@
611
		return $success;
612
	}
613
614
	public function getChapterData(string $title_url, string $chapter) : array {
615
		$chapter_parts = explode(':--:', $chapter);
616
617
		return [
618
			'url'    => "http://kissmanga.com/Manga/{$title_url}/{$chapter_parts[0]}?id={$chapter_parts[1]}",
619
			//FIXME: KM has an extremely inconsistant chapter format which makes it difficult to parse.
620
			'number' => /*preg_replace('/--.*?$/', '', */$chapter_parts[0]/*)*/
621
		];
622
	}
623
624
	public function getTitleData(string $title_url) {
625
		$titleData = [];