Code Duplication    Length = 12-12 lines in 4 locations

utility/Header.class.inc.php 4 locations

@@ 6-17 (lines=12) @@
3
final class Header
4
{
5
6
	public static function sendJSON()
7
	{
8
		$array = array(
9
			'HTTP/1.1 200 OK',
10
			'Cache-Control: no-cache',
11
			'Content-Language: en',
12
			'Content-Type: application/json',
13
			'Expires: ' . self::get_date(time() - 1),
14
			'Last-Modified: ' . self::get_date(),
15
			'X-Powered-By: jacobemerick.com');
16
		self::send($array);
17
	}
18
19
	public static function sendHTML()
20
	{
@@ 19-30 (lines=12) @@
16
		self::send($array);
17
	}
18
19
	public static function sendHTML()
20
	{
21
		$array = array(
22
			'HTTP/1.1 200 OK',
23
			'Cache-Control: no-cache',
24
			'Content-Language: en',
25
			'Content-Type: text/html',
26
			'Expires: ' . self::get_date(time() - 1),
27
			'Last-Modified: ' . self::get_date(),
28
			'X-Powered-By: jacobemerick.com');
29
		self::send($array);
30
	}
31
32
	public static function redirect($location, $method = 301)
33
	{
@@ 38-49 (lines=12) @@
35
		exit();
36
	}
37
38
	public static function send404()
39
	{
40
		$array = array(
41
			'HTTP/1.1 404 Not Found',
42
			'Cache-Control: no-cache',
43
			'Content-Language: en',
44
			'Content-Type: text/html',
45
			'Expires: ' . self::get_date(time() - 1),
46
			'Last-Modified: ' . self::get_date(),
47
			'X-Powered-By: jacobemerick.com');
48
		self::send($array);
49
	}
50
51
	public static function send503()
52
	{
@@ 51-62 (lines=12) @@
48
		self::send($array);
49
	}
50
51
	public static function send503()
52
	{
53
		$array = array(
54
			'HTTP/1.1 503 Service Unavailable',
55
			'Cache-Control: no-cache',
56
			'Content-Language: en',
57
			'Content-Type: text/html',
58
			'Expires: ' . self::get_date(time() - 1),
59
			'Last-Modified: ' . self::get_date(),
60
			'X-Powered-By: jacobemerick.com');
61
		self::send($array);
62
	}
63
64
	private static function send($array, $gzip = true)
65
	{