Code Duplication    Length = 9-9 lines in 2 locations

application/models/Site_Model.php 2 locations

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