Code Duplication    Length = 23-23 lines in 5 locations

application/models/Site_Model.php 5 locations

@@ 1072-1094 (lines=23) @@
1069
1070
/*** FoolSlide sites ***/
1071
1072
class KireiCake extends Site_Model {
1073
	public $site          = 'KireiCake';
1074
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1075
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1076
1077
	public function getFullTitleURL(string $title_url) : string {
1078
		return "https://reader.kireicake.com/series/{$title_url}";
1079
	}
1080
1081
	public function getChapterData(string $title_url, string $chapter) : array {
1082
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1083
		$chapter_parts = explode('/', $chapter);
1084
		return [
1085
			'url'    => "https://reader.kireicake.com/read/{$title_url}/{$chapter}/",
1086
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1087
		];
1088
	}
1089
1090
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1091
		$fullURL = $this->getFullTitleURL($title_url);
1092
		return $this->parseFoolSlide($fullURL, $title_url);
1093
	}
1094
}
1095
1096
class SeaOtterScans extends Site_Model {
1097
	public $site          = 'SeaOtterScans';
@@ 1096-1118 (lines=23) @@
1093
	}
1094
}
1095
1096
class SeaOtterScans extends Site_Model {
1097
	public $site          = 'SeaOtterScans';
1098
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1099
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1100
1101
	public function getFullTitleURL(string $title_url) : string {
1102
		return "https://reader.seaotterscans.com/series/{$title_url}";
1103
	}
1104
1105
	public function getChapterData(string $title_url, string $chapter) : array {
1106
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1107
		$chapter_parts = explode('/', $chapter);
1108
		return [
1109
			'url'    => "https://reader.seaotterscans.com/read/{$title_url}/{$chapter}/",
1110
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1111
		];
1112
	}
1113
1114
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1115
		$fullURL = $this->getFullTitleURL($title_url);
1116
		return $this->parseFoolSlide($fullURL, $title_url);
1117
	}
1118
}
1119
1120
class HelveticaScans extends Site_Model {
1121
	public $site          = 'HelveticaScans';
@@ 1120-1142 (lines=23) @@
1117
	}
1118
}
1119
1120
class HelveticaScans extends Site_Model {
1121
	public $site          = 'HelveticaScans';
1122
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1123
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1124
1125
	public function getFullTitleURL(string $title_url) : string {
1126
		return "http://helveticascans.com/reader/series/{$title_url}";
1127
	}
1128
1129
	public function getChapterData(string $title_url, string $chapter) : array {
1130
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1131
		$chapter_parts = explode('/', $chapter);
1132
		return [
1133
			'url'    => "http://helveticascans.com/reader/read/{$title_url}/{$chapter}/",
1134
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1135
		];
1136
	}
1137
1138
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1139
		$fullURL = $this->getFullTitleURL($title_url);
1140
		return $this->parseFoolSlide($fullURL, $title_url);
1141
	}
1142
}
1143
1144
class SenseScans extends Site_Model {
1145
	public $site          = 'SenseScans';
@@ 1144-1166 (lines=23) @@
1141
	}
1142
}
1143
1144
class SenseScans extends Site_Model {
1145
	public $site          = 'SenseScans';
1146
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1147
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1148
1149
	public function getFullTitleURL(string $title_url) : string {
1150
		return "http://reader.sensescans.com/series/{$title_url}";
1151
	}
1152
1153
	public function getChapterData(string $title_url, string $chapter) : array {
1154
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1155
		$chapter_parts = explode('/', $chapter);
1156
		return [
1157
			'url'    => "http://reader.sensescans.com/read/{$title_url}/{$chapter}/",
1158
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1159
		];
1160
	}
1161
1162
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1163
		$fullURL = $this->getFullTitleURL($title_url);
1164
		return $this->parseFoolSlide($fullURL, $title_url);
1165
	}
1166
}
1167
1168
class JaiminisBox extends Site_Model {
1169
	public $site          = 'JaiminisBox';
@@ 1168-1190 (lines=23) @@
1165
	}
1166
}
1167
1168
class JaiminisBox extends Site_Model {
1169
	public $site          = 'JaiminisBox';
1170
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1171
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1172
1173
	public function getFullTitleURL(string $title_url) : string {
1174
		return "https://jaiminisbox.com/reader/series/{$title_url}";
1175
	}
1176
1177
	public function getChapterData(string $title_url, string $chapter) : array {
1178
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1179
		$chapter_parts = explode('/', $chapter);
1180
		return [
1181
			'url'    => "https://jaiminisbox.com/reader/read/{$title_url}/{$chapter}/",
1182
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1183
		];
1184
	}
1185
1186
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1187
		$fullURL = $this->getFullTitleURL($title_url);
1188
		return $this->parseFoolSlide($fullURL, $title_url);
1189
	}
1190
}
1191