Code Duplication    Length = 22-22 lines in 8 locations

application/models/Site_Model.php 8 locations

@@ 1084-1105 (lines=22) @@
1081
1082
/*** FoolSlide sites ***/
1083
1084
class KireiCake extends Site_Model {
1085
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1086
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1087
1088
	public function getFullTitleURL(string $title_url) : string {
1089
		return "https://reader.kireicake.com/series/{$title_url}";
1090
	}
1091
1092
	public function getChapterData(string $title_url, string $chapter) : array {
1093
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1094
		$chapter_parts = explode('/', $chapter);
1095
		return [
1096
			'url'    => "https://reader.kireicake.com/read/{$title_url}/{$chapter}/",
1097
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1098
		];
1099
	}
1100
1101
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1102
		$fullURL = $this->getFullTitleURL($title_url);
1103
		return $this->parseFoolSlide($fullURL, $title_url);
1104
	}
1105
}
1106
1107
class SeaOtterScans extends Site_Model {
1108
	public $titleFormat   = '/^[a-z0-9_-]+$/';
@@ 1107-1128 (lines=22) @@
1104
	}
1105
}
1106
1107
class SeaOtterScans extends Site_Model {
1108
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1109
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1110
1111
	public function getFullTitleURL(string $title_url) : string {
1112
		return "https://reader.seaotterscans.com/series/{$title_url}";
1113
	}
1114
1115
	public function getChapterData(string $title_url, string $chapter) : array {
1116
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1117
		$chapter_parts = explode('/', $chapter);
1118
		return [
1119
			'url'    => "https://reader.seaotterscans.com/read/{$title_url}/{$chapter}/",
1120
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1121
		];
1122
	}
1123
1124
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1125
		$fullURL = $this->getFullTitleURL($title_url);
1126
		return $this->parseFoolSlide($fullURL, $title_url);
1127
	}
1128
}
1129
1130
class HelveticaScans extends Site_Model {
1131
	public $titleFormat   = '/^[a-z0-9_-]+$/';
@@ 1130-1151 (lines=22) @@
1127
	}
1128
}
1129
1130
class HelveticaScans extends Site_Model {
1131
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1132
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1133
1134
	public function getFullTitleURL(string $title_url) : string {
1135
		return "http://helveticascans.com/reader/series/{$title_url}";
1136
	}
1137
1138
	public function getChapterData(string $title_url, string $chapter) : array {
1139
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1140
		$chapter_parts = explode('/', $chapter);
1141
		return [
1142
			'url'    => "http://helveticascans.com/reader/read/{$title_url}/{$chapter}/",
1143
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1144
		];
1145
	}
1146
1147
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1148
		$fullURL = $this->getFullTitleURL($title_url);
1149
		return $this->parseFoolSlide($fullURL, $title_url);
1150
	}
1151
}
1152
1153
class SenseScans extends Site_Model {
1154
	public $titleFormat   = '/^[a-z0-9_-]+$/';
@@ 1153-1174 (lines=22) @@
1150
	}
1151
}
1152
1153
class SenseScans extends Site_Model {
1154
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1155
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1156
1157
	public function getFullTitleURL(string $title_url) : string {
1158
		return "http://reader.sensescans.com/series/{$title_url}";
1159
	}
1160
1161
	public function getChapterData(string $title_url, string $chapter) : array {
1162
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1163
		$chapter_parts = explode('/', $chapter);
1164
		return [
1165
			'url'    => "http://reader.sensescans.com/read/{$title_url}/{$chapter}/",
1166
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1167
		];
1168
	}
1169
1170
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1171
		$fullURL = $this->getFullTitleURL($title_url);
1172
		return $this->parseFoolSlide($fullURL, $title_url);
1173
	}
1174
}
1175
1176
class JaiminisBox extends Site_Model {
1177
	public $titleFormat   = '/^[a-z0-9_-]+$/';
@@ 1176-1197 (lines=22) @@
1173
	}
1174
}
1175
1176
class JaiminisBox extends Site_Model {
1177
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1178
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1179
1180
	public function getFullTitleURL(string $title_url) : string {
1181
		return "https://jaiminisbox.com/reader/series/{$title_url}";
1182
	}
1183
1184
	public function getChapterData(string $title_url, string $chapter) : array {
1185
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1186
		$chapter_parts = explode('/', $chapter);
1187
		return [
1188
			'url'    => "https://jaiminisbox.com/reader/read/{$title_url}/{$chapter}/",
1189
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1190
		];
1191
	}
1192
1193
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1194
		$fullURL = $this->getFullTitleURL($title_url);
1195
		return $this->parseFoolSlide($fullURL, $title_url);
1196
	}
1197
}
1198
1199
class DokiFansubs extends Site_Model {
1200
	public $titleFormat   = '/^[a-z0-9_-]+$/';
@@ 1199-1220 (lines=22) @@
1196
	}
1197
}
1198
1199
class DokiFansubs extends Site_Model {
1200
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1201
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1202
1203
	public function getFullTitleURL(string $title_url) : string {
1204
		return "https://kobato.hologfx.com/reader/series/{$title_url}";
1205
	}
1206
1207
	public function getChapterData(string $title_url, string $chapter) : array {
1208
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1209
		$chapter_parts = explode('/', $chapter);
1210
		return [
1211
			'url'    => "https://kobato.hologfx.com/reader/read/{$title_url}/{$chapter}/",
1212
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1213
		];
1214
	}
1215
1216
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1217
		$fullURL = $this->getFullTitleURL($title_url);
1218
		return $this->parseFoolSlide($fullURL, $title_url);
1219
	}
1220
}
1221
1222
class DemonicScans extends Site_Model {
1223
	public $titleFormat   = '/^[a-z0-9_-]+$/';
@@ 1222-1243 (lines=22) @@
1219
	}
1220
}
1221
1222
class DemonicScans extends Site_Model {
1223
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1224
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1225
1226
	public function getFullTitleURL(string $title_url) : string {
1227
		return "http://www.demonicscans.com/FoOlSlide/series/{$title_url}";
1228
	}
1229
1230
	public function getChapterData(string $title_url, string $chapter) : array {
1231
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1232
		$chapter_parts = explode('/', $chapter);
1233
		return [
1234
			'url'    => "http://www.demonicscans.com/FoOlSlide/read/{$title_url}/{$chapter}/",
1235
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1236
		];
1237
	}
1238
1239
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1240
		$fullURL = $this->getFullTitleURL($title_url);
1241
		return $this->parseFoolSlide($fullURL, $title_url);
1242
	}
1243
}
1244
1245
class DeathTollScans extends Site_Model {
1246
	public $titleFormat   = '/^[a-z0-9_-]+$/';
@@ 1245-1266 (lines=22) @@
1242
	}
1243
}
1244
1245
class DeathTollScans extends Site_Model {
1246
	public $titleFormat   = '/^[a-z0-9_-]+$/';
1247
	public $chapterFormat = '/^en\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+(?:\/[0-9]+)?)?)?$/';
1248
1249
	public function getFullTitleURL(string $title_url) : string {
1250
		return "https://reader.deathtollscans.net/series/{$title_url}";
1251
	}
1252
1253
	public function getChapterData(string $title_url, string $chapter) : array {
1254
		//LANG/VOLUME/CHAPTER/CHAPTER_EXTRA(/page/)
1255
		$chapter_parts = explode('/', $chapter);
1256
		return [
1257
			'url'    => "https://reader.deathtollscans.net/read/{$title_url}/{$chapter}/",
1258
			'number' => ($chapter_parts[1] !== '0' ? "v{$chapter_parts[1]}/" : '') . "c{$chapter_parts[2]}" . (isset($chapter_parts[3]) ? ".{$chapter_parts[3]}" : '')/*)*/
1259
		];
1260
	}
1261
1262
	public function getTitleData(string $title_url, bool $firstGet = FALSE) {
1263
		$fullURL = $this->getFullTitleURL($title_url);
1264
		return $this->parseFoolSlide($fullURL, $title_url);
1265
	}
1266
}
1267