Code Duplication    Length = 9-9 lines in 2 locations

application/models/Site_Model.php 2 locations

@@ 269-277 (lines=9) @@
266
		return $success;
267
	}
268
269
	public function getChapterData(string $title_string, string $chapter) : array {
270
		//$title_string isn't used here.
271
272
		$chapter_parts = explode(':--:', $chapter);
273
		return [
274
			'url'    => "http://bato.to/reader#" . $chapter_parts[0],
275
			'number' => $chapter_parts[1]
276
		];
277
	}
278
279
	public function getTitleData(string $title_string) {
280
		$title_parts = explode(':--:', $title_string);
@@ 678-686 (lines=9) @@
675
		return $success;
676
	}
677
678
	public function getChapterData(string $title_url, string $chapter) : array {
679
		$chapter_parts = explode(':--:', $chapter);
680
681
		return [
682
			'url'    => "http://kissmanga.com/Manga/{$title_url}/{$chapter_parts[0]}?id={$chapter_parts[1]}",
683
			//FIXME: KM has an extremely inconsistant chapter format which makes it difficult to parse.
684
			'number' => /*preg_replace('/--.*?$/', '', */$chapter_parts[0]/*)*/
685
		];
686
	}
687
688
	public function getTitleData(string $title_url) {
689
		$titleData = [];