Completed
Pull Request — master (#10)
by
unknown
02:50
created
php/Requests/libary/Requests/Proxy.php 3 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,8 @@
 block discarded – undo
20 20
  * @subpackage Proxy
21 21
  * @since 1.6
22 22
  */
23
-interface Requests_Proxy {
23
+interface Requests_Proxy
24
+{
24 25
 	/**
25 26
 	 * Register hooks as needed
26 27
 	 *
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -28,6 +28,7 @@
 block discarded – undo
28 28
 	 *
29 29
 	 * @see Requests_Hooks::register
30 30
 	 * @param Requests_Hooks $hooks Hook system
31
+	 * @return void
31 32
 	 */
32 33
 	public function register(Requests_Hooks &$hooks);
33 34
 }
34 35
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,5 +29,5 @@
 block discarded – undo
29 29
 	 * @see Requests_Hooks::register
30 30
 	 * @param Requests_Hooks $hooks Hook system
31 31
 	 */
32
-	public function register(Requests_Hooks &$hooks);
32
+	public function register(Requests_Hooks&$hooks);
33 33
 }
34 34
\ No newline at end of file
Please login to merge, or discard this patch.
php/Requests/libary/Requests/Exception.php 2 patches
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,8 @@  discard block
 block discarded – undo
10 10
  *
11 11
  * @package Requests
12 12
  */
13
-class Requests_Exception extends Exception {
13
+class Requests_Exception extends Exception
14
+{
14 15
 	/**
15 16
 	 * Type of exception
16 17
 	 *
@@ -33,7 +34,8 @@  discard block
 block discarded – undo
33 34
 	 * @param mixed $data Associated data
34 35
 	 * @param integer $code Exception numerical code, if applicable
35 36
 	 */
36
-	public function __construct($message, $type, $data = null, $code = 0) {
37
+	public function __construct($message, $type, $data = null, $code = 0)
38
+	{
37 39
 		parent::__construct($message, $code);
38 40
 
39 41
 		$this->type = $type;
@@ -46,7 +48,8 @@  discard block
 block discarded – undo
46 48
 	 * @codeCoverageIgnore
47 49
 	 * @return string
48 50
 	 */
49
-	public function getType() {
51
+	public function getType()
52
+	{
50 53
 		return $this->type;
51 54
 	}
52 55
 
@@ -56,7 +59,8 @@  discard block
 block discarded – undo
56 59
 	 * @codeCoverageIgnore
57 60
 	 * @return mixed
58 61
 	 */
59
-	public function getData() {
62
+	public function getData()
63
+	{
60 64
 		return $this->data;
61 65
 	}
62 66
 }
63 67
\ No newline at end of file
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 	 * @param mixed $data Associated data
34 34
 	 * @param integer $code Exception numerical code, if applicable
35 35
 	 */
36
-	public function __construct($message, $type, $data = null, $code = 0) {
36
+	public function __construct($message, $type, $data = NULL, $code = 0) {
37 37
 		parent::__construct($message, $code);
38 38
 
39 39
 		$this->type = $type;
Please login to merge, or discard this patch.
php/Requests/libary/Requests/Auth/Basic.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 	 * @param array|null $args Array of user and password. Must have exactly two elements
38 38
 	 */
39 39
 	public function __construct($args = null) {
40
-		if (is_array($args)) {
41
-			if (count($args) !== 2) {
40
+		if(is_array($args)) {
41
+			if(count($args) !== 2) {
42 42
 				throw new Requests_Exception('Invalid number of arguments', 'authbasicbadargs');
43 43
 			}
44 44
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 * @see fsockopen_header
54 54
 	 * @param Requests_Hooks $hooks Hook system
55 55
 	 */
56
-	public function register(Requests_Hooks &$hooks) {
56
+	public function register(Requests_Hooks&$hooks) {
57 57
 		$hooks->register('curl.before_send', array(&$this, 'curl_before_send'));
58 58
 		$hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header'));
59 59
 	}
Please login to merge, or discard this patch.
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,7 +15,8 @@  discard block
 block discarded – undo
15 15
  * @package Requests
16 16
  * @subpackage Authentication
17 17
  */
18
-class Requests_Auth_Basic implements Requests_Auth {
18
+class Requests_Auth_Basic implements Requests_Auth
19
+{
19 20
 	/**
20 21
 	 * Username
21 22
 	 *
@@ -36,9 +37,12 @@  discard block
 block discarded – undo
36 37
 	 * @throws Requests_Exception On incorrect number of arguments (`authbasicbadargs`)
37 38
 	 * @param array|null $args Array of user and password. Must have exactly two elements
38 39
 	 */
39
-	public function __construct($args = null) {
40
-		if (is_array($args)) {
41
-			if (count($args) !== 2) {
40
+	public function __construct($args = null)
41
+	{
42
+		if (is_array($args))
43
+		{
44
+			if (count($args) !== 2)
45
+			{
42 46
 				throw new Requests_Exception('Invalid number of arguments', 'authbasicbadargs');
43 47
 			}
44 48
 
@@ -53,7 +57,8 @@  discard block
 block discarded – undo
53 57
 	 * @see fsockopen_header
54 58
 	 * @param Requests_Hooks $hooks Hook system
55 59
 	 */
56
-	public function register(Requests_Hooks &$hooks) {
60
+	public function register(Requests_Hooks &$hooks)
61
+	{
57 62
 		$hooks->register('curl.before_send', array(&$this, 'curl_before_send'));
58 63
 		$hooks->register('fsockopen.after_headers', array(&$this, 'fsockopen_header'));
59 64
 	}
@@ -63,7 +68,8 @@  discard block
 block discarded – undo
63 68
 	 *
64 69
 	 * @param resource $handle cURL resource
65 70
 	 */
66
-	public function curl_before_send(&$handle) {
71
+	public function curl_before_send(&$handle)
72
+	{
67 73
 		curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
68 74
 		curl_setopt($handle, CURLOPT_USERPWD, $this->getAuthString());
69 75
 	}
@@ -73,7 +79,8 @@  discard block
 block discarded – undo
73 79
 	 *
74 80
 	 * @param string $out HTTP header string
75 81
 	 */
76
-	public function fsockopen_header(&$out) {
82
+	public function fsockopen_header(&$out)
83
+	{
77 84
 		$out .= sprintf("Authorization: Basic %s\r\n", base64_encode($this->getAuthString()));
78 85
 	}
79 86
 
@@ -82,7 +89,8 @@  discard block
 block discarded – undo
82 89
 	 *
83 90
 	 * @return string
84 91
 	 */
85
-	public function getAuthString() {
92
+	public function getAuthString()
93
+	{
86 94
 		return $this->user . ':' . $this->pass;
87 95
 	}
88 96
 }
89 97
\ No newline at end of file
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 	 * @throws Requests_Exception On incorrect number of arguments (`authbasicbadargs`)
37 37
 	 * @param array|null $args Array of user and password. Must have exactly two elements
38 38
 	 */
39
-	public function __construct($args = null) {
39
+	public function __construct($args = NULL) {
40 40
 		if (is_array($args)) {
41 41
 			if (count($args) !== 2) {
42 42
 				throw new Requests_Exception('Invalid number of arguments', 'authbasicbadargs');
Please login to merge, or discard this patch.
php/Requests/UpdateLocation.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-class UpdateLocation extends AbstractRequest {
4
+class UpdateLocation extends AbstractRequest
5
+{
5 6
 		 /**
6 7
      * @var Location
7 8
      */
Please login to merge, or discard this patch.
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -3,37 +3,37 @@
 block discarded – undo
3 3
 
4 4
 class UpdateLocation extends AbstractRequest {
5 5
 		 /**
6
-     * @var Location
7
-     */
8
-    public $location;
9
-    /**
10
-     * @return Location
11
-     */
12
-    public function getLocation()
13
-    {
14
-        return $this->location;
15
-    }
16
-    /**
17
-     * @param Location $location
18
-     */
19
-    public function setLocation($location)
20
-    {
21
-        $this->location = $location;
22
-    }
6
+		  * @var Location
7
+		  */
8
+	public $location;
9
+	/**
10
+	 * @return Location
11
+	 */
12
+	public function getLocation()
13
+	{
14
+		return $this->location;
15
+	}
16
+	/**
17
+	 * @param Location $location
18
+	 */
19
+	public function setLocation($location)
20
+	{
21
+		$this->location = $location;
22
+	}
23 23
 		
24
-    function getApiEndPoint()
25
-    {
26
-        return '/v2/users/location';
27
-    }
28
-    function getPayload()
29
-    {
30
-        return array(
24
+	function getApiEndPoint()
25
+	{
26
+		return '/v2/users/location';
27
+	}
28
+	function getPayload()
29
+	{
30
+		return array(
31 31
 			'location' => $this->getLocation()->toArray(),
32
-        );
33
-    }
34
-    function getMethod()
35
-    {
36
-        return 'PUT';
37
-    }
32
+		);
33
+	}
34
+	function getMethod()
35
+	{
36
+		return 'PUT';
37
+	}
38 38
 }
39 39
 
Please login to merge, or discard this patch.
php/Requests/CreateUser.php 4 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -33,6 +33,9 @@
 block discarded – undo
33 33
         return $this->random_str(64, 'abcdef0123456789');
34 34
     }
35 35
     
36
+    /**
37
+     * @param integer $length
38
+     */
36 39
     private function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
37 40
     {
38 41
         $str = '';
Please login to merge, or discard this patch.
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -1,53 +1,53 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class CreateUser extends AbstractRequest {
4
-    /**
5
-     * @var Location
6
-     */
7
-    private $location;
8
-    private $deviceUid;
9
-    /**
10
-     * @return Location
11
-     */
12
-    private function getLocation()
13
-    {
14
-        return $this->location;
15
-    }
16
-    /**
17
-     * @param Location $location
18
-     */
19
-    public function setLocation(Location $location)
20
-    {
21
-        $this->location = $location;
22
-    }
23
-    private function getDeviceUid()
24
-    {
4
+	/**
5
+	 * @var Location
6
+	 */
7
+	private $location;
8
+	private $deviceUid;
9
+	/**
10
+	 * @return Location
11
+	 */
12
+	private function getLocation()
13
+	{
14
+		return $this->location;
15
+	}
16
+	/**
17
+	 * @param Location $location
18
+	 */
19
+	public function setLocation(Location $location)
20
+	{
21
+		$this->location = $location;
22
+	}
23
+	private function getDeviceUid()
24
+	{
25 25
 		return $this->deviceUid;
26 26
 	}
27 27
 	public function setDeviceUid($deviceUid)
28
-    {
28
+	{
29 29
 			$this->deviceUid = $deviceUid;
30 30
 	}
31
-    private function generateDeviceUid()
32
-    {
33
-        return $this->random_str(64, 'abcdef0123456789');
34
-    }
31
+	private function generateDeviceUid()
32
+	{
33
+		return $this->random_str(64, 'abcdef0123456789');
34
+	}
35 35
     
36
-    private function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
37
-    {
38
-        $str = '';
39
-        $max = mb_strlen($keyspace, '8bit') - 1;
40
-        for ($i = 0; $i < $length; ++$i) {
41
-            $str .= $keyspace[rand(0, $max)];
42
-        }
43
-        return $str;
44
-    }
45
-    public function getApiEndPoint()
46
-    {
47
-        return '/v2/users';
48
-    }
49
-    public function getPayload()
50
-    {
36
+	private function random_str($length, $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
37
+	{
38
+		$str = '';
39
+		$max = mb_strlen($keyspace, '8bit') - 1;
40
+		for ($i = 0; $i < $length; ++$i) {
41
+			$str .= $keyspace[rand(0, $max)];
42
+		}
43
+		return $str;
44
+	}
45
+	public function getApiEndPoint()
46
+	{
47
+		return '/v2/users';
48
+	}
49
+	public function getPayload()
50
+	{
51 51
 			if(!isset($this->deviceUid))
52 52
 			{
53 53
 				$this->setDeviceUid($this->generateDeviceUid());
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
 					"client_id" => self::CLIENTID,
59 59
 					"device_uid" => $this->getDeviceUid(),
60 60
 			);
61
-    }
62
-    public function getMethod()
63
-    {
64
-        return 'POST';
65
-    }
61
+	}
62
+	public function getMethod()
63
+	{
64
+		return 'POST';
65
+	}
66 66
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         $str = '';
39 39
         $max = mb_strlen($keyspace, '8bit') - 1;
40
-        for ($i = 0; $i < $length; ++$i) {
40
+        for($i = 0; $i < $length; ++$i) {
41 41
             $str .= $keyspace[rand(0, $max)];
42 42
         }
43 43
         return $str;
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-class CreateUser extends AbstractRequest {
3
+class CreateUser extends AbstractRequest
4
+{
4 5
     /**
5 6
      * @var Location
6 7
      */
@@ -25,7 +26,7 @@  discard block
 block discarded – undo
25 26
 		return $this->deviceUid;
26 27
 	}
27 28
 	public function setDeviceUid($deviceUid)
28
-    {
29
+	{
29 30
 			$this->deviceUid = $deviceUid;
30 31
 	}
31 32
     private function generateDeviceUid()
@@ -37,7 +38,8 @@  discard block
 block discarded – undo
37 38
     {
38 39
         $str = '';
39 40
         $max = mb_strlen($keyspace, '8bit') - 1;
40
-        for ($i = 0; $i < $length; ++$i) {
41
+        for ($i = 0; $i < $length; ++$i)
42
+        {
41 43
             $str .= $keyspace[rand(0, $max)];
42 44
         }
43 45
         return $str;
Please login to merge, or discard this patch.
php/AccountData.php 1 patch
Indentation   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -2,94 +2,94 @@
 block discarded – undo
2 2
 
3 3
 class AccountData
4 4
 {
5
-    /**
6
-     * @var string
7
-     */
8
-    public $accessToken;
9
-    /**
10
-     * @var string
11
-     */
12
-    public $expirationDate;
13
-    /**
14
-     * @var string
15
-     */
16
-    public $refreshToken;
17
-    /**
18
-     * @var string
19
-     */
20
-    public $distinctId;
21
-    /**
22
-     * @var string
23
-     */
24
-    public $deviceUid;
25
-    /**
26
-     * @return string
27
-     */
28
-    public function getAccessToken()
29
-    {
30
-        return $this->accessToken;
31
-    }
32
-    /**
33
-     * @param string $accessToken
34
-     */
35
-    public function setAccessToken(string $accessToken)
36
-    {
37
-        $this->accessToken = $accessToken;
38
-    }
39
-    /**
40
-     * @return string
41
-     */
42
-    public function getExpirationDate()
43
-    {
44
-        return $this->expirationDate;
45
-    }
46
-    /**
47
-     * @param string $expirationDate
48
-     */
49
-    public function setExpirationDate(string $expirationDate)
50
-    {
51
-        $this->expirationDate = $expirationDate;
52
-    }
53
-    /**
54
-     * @return string
55
-     */
56
-    public function getRefreshToken()
57
-    {
58
-        return $this->refreshToken;
59
-    }
60
-    /**
61
-     * @param string $refreshToken
62
-     */
63
-    public function setRefreshToken(string $refreshToken)
64
-    {
65
-        $this->refreshToken = $refreshToken;
66
-    }
67
-    /**
68
-     * @return string
69
-     */
70
-    public function getDistinctId()
71
-    {
72
-        return $this->distinctId;
73
-    }
74
-    /**
75
-     * @param string $distinctId
76
-     */
77
-    public function setDistinctId(string $distinctId)
78
-    {
79
-        $this->distinctId = $distinctId;
80
-    }
81
-    /**
82
-     * @return string
83
-     */
84
-    public function getDeviceUid()
85
-    {
86
-        return $this->deviceUid;
87
-    }
88
-    /**
89
-     * @param string $deviceUid
90
-     */
91
-    public function setDeviceUid(string $deviceUid)
92
-    {
93
-        $this->deviceUid = $deviceUid;
94
-    }
5
+	/**
6
+	 * @var string
7
+	 */
8
+	public $accessToken;
9
+	/**
10
+	 * @var string
11
+	 */
12
+	public $expirationDate;
13
+	/**
14
+	 * @var string
15
+	 */
16
+	public $refreshToken;
17
+	/**
18
+	 * @var string
19
+	 */
20
+	public $distinctId;
21
+	/**
22
+	 * @var string
23
+	 */
24
+	public $deviceUid;
25
+	/**
26
+	 * @return string
27
+	 */
28
+	public function getAccessToken()
29
+	{
30
+		return $this->accessToken;
31
+	}
32
+	/**
33
+	 * @param string $accessToken
34
+	 */
35
+	public function setAccessToken(string $accessToken)
36
+	{
37
+		$this->accessToken = $accessToken;
38
+	}
39
+	/**
40
+	 * @return string
41
+	 */
42
+	public function getExpirationDate()
43
+	{
44
+		return $this->expirationDate;
45
+	}
46
+	/**
47
+	 * @param string $expirationDate
48
+	 */
49
+	public function setExpirationDate(string $expirationDate)
50
+	{
51
+		$this->expirationDate = $expirationDate;
52
+	}
53
+	/**
54
+	 * @return string
55
+	 */
56
+	public function getRefreshToken()
57
+	{
58
+		return $this->refreshToken;
59
+	}
60
+	/**
61
+	 * @param string $refreshToken
62
+	 */
63
+	public function setRefreshToken(string $refreshToken)
64
+	{
65
+		$this->refreshToken = $refreshToken;
66
+	}
67
+	/**
68
+	 * @return string
69
+	 */
70
+	public function getDistinctId()
71
+	{
72
+		return $this->distinctId;
73
+	}
74
+	/**
75
+	 * @param string $distinctId
76
+	 */
77
+	public function setDistinctId(string $distinctId)
78
+	{
79
+		$this->distinctId = $distinctId;
80
+	}
81
+	/**
82
+	 * @return string
83
+	 */
84
+	public function getDeviceUid()
85
+	{
86
+		return $this->deviceUid;
87
+	}
88
+	/**
89
+	 * @param string $deviceUid
90
+	 */
91
+	public function setDeviceUid(string $deviceUid)
92
+	{
93
+		$this->deviceUid = $deviceUid;
94
+	}
95 95
 }
Please login to merge, or discard this patch.
php/Requests/SendJodel.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class SendJodel extends AbstractRequest {
4
-    public $location;
5
-    public $ancestor = "";
6
-    public $color = "";
4
+	public $location;
5
+	public $ancestor = "";
6
+	public $color = "";
7 7
     
8
-    function getApiEndPoint()
9
-    {
10
-        return '/v3/posts/';
11
-    }
8
+	function getApiEndPoint()
9
+	{
10
+		return '/v3/posts/';
11
+	}
12 12
 
13
-    function getPayload()
14
-    {
15
-        return array(
13
+	function getPayload()
14
+	{
15
+		return array(
16 16
 			"ancestor" => $this->ancestor,
17 17
 			"color" => $this->color,
18
-            "location" => $this->location->toArray(),
19
-            "message" => $_POST['message'],
20
-        );
21
-    }
22
-    function getMethod()
23
-    {
24
-        return 'POST';
25
-    }
18
+			"location" => $this->location->toArray(),
19
+			"message" => $_POST['message'],
20
+		);
21
+	}
22
+	function getMethod()
23
+	{
24
+		return 'POST';
25
+	}
26 26
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-class SendJodel extends AbstractRequest {
3
+class SendJodel extends AbstractRequest
4
+{
4 5
     public $location;
5 6
     public $ancestor = "";
6 7
     public $color = "";
Please login to merge, or discard this patch.
get-posts-ajax.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,8 @@
 block discarded – undo
45 45
 
46 46
 	if(isset($_GET['view']))
47 47
 	{
48
-		switch ($_GET['view']) {
48
+		switch ($_GET['view'])
49
+		{
49 50
 			case 'comment':
50 51
 				$view = 'comment';
51 52
 				break;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 if(!isset($_COOKIE["JodelDeviceId"]))
19 19
 {
20 20
 	$deviceUid = createAccount();
21
-	setcookie("JodelDeviceId", $deviceUid, time()+60*60*24*365*10);
21
+	setcookie("JodelDeviceId", $deviceUid, time() + 60 * 60 * 24 * 365 * 10);
22 22
 	
23 23
 }
24 24
 else
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 	if(isset($_GET['view']))
39 39
 	{
40
-		switch ($_GET['view']) {
40
+		switch($_GET['view']) {
41 41
 			case 'comment':
42 42
 				$view = 'comment';
43 43
 				break;
@@ -56,13 +56,13 @@  discard block
 block discarded – undo
56 56
 		$view = 'time';
57 57
 	}
58 58
 
59
-	if($view=='comment')
59
+	if($view == 'comment')
60 60
 	{
61 61
 		$url = "/v2/posts/location/discussed/";
62 62
 	}
63 63
 	else
64 64
 	{
65
-		if($view=='upVote')
65
+		if($view == 'upVote')
66 66
 		{
67 67
 			$url = "/v2/posts/location/popular/";
68 68
 		}
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 		?>
83 83
 		<div class="nextPosts">
84 84
 		<?php
85
-		for($i = 0; $i<$loops; $i++)
85
+		for($i = 0; $i < $loops; $i++)
86 86
 		{
87 87
 			if(isset($posts[$i]))
88 88
 			{
Please login to merge, or discard this patch.
php/Requests/GetPosts.php 3 patches
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -4,25 +4,25 @@  discard block
 block discarded – undo
4 4
 {
5 5
 	public $lastPostId;
6 6
 
7
-    /**
8
-     * @var Location
9
-     */
10
-    public $location;
11
-    public $url;
7
+	/**
8
+	 * @var Location
9
+	 */
10
+	public $location;
11
+	public $url;
12 12
 
13 13
         
14
-    function setUrl ($url)
15
-    {
16
-            $this->url = $url;
17
-    }
14
+	function setUrl ($url)
15
+	{
16
+			$this->url = $url;
17
+	}
18 18
     
19
-    function getUrl ()
20
-    {
21
-        return $this->url;
22
-    }
19
+	function getUrl ()
20
+	{
21
+		return $this->url;
22
+	}
23 23
 		
24
-    function setLastPostId ($lastPostId)
25
-    {
24
+	function setLastPostId ($lastPostId)
25
+	{
26 26
 			$this->lastPostId = $lastPostId;
27 27
 	}
28 28
 	
@@ -31,38 +31,38 @@  discard block
 block discarded – undo
31 31
 		return $this->lastPostId;
32 32
 	}
33 33
     
34
-    function getApiEndPoint()
35
-    {
36
-        $apiEndPoint = $this->getUrl();
34
+	function getApiEndPoint()
35
+	{
36
+		$apiEndPoint = $this->getUrl();
37 37
 
38
-        if ($this->getLastPostId() != "") {
38
+		if ($this->getLastPostId() != "") {
39 39
 			$apiEndPoint = $this->getUrl() . '?after=' . $this->getLastPostId();
40 40
 		}
41
-        return $apiEndPoint;
42
-    }
43
-    function getPayload()
44
-    {
45
-        if($this->version == 'v3')
46
-        {
47
-            $this->location = new Location();
48
-            $this->location->setLat(52.520006);
49
-            $this->location->setLng(13.404954);
50
-            $this->location->setCityName('Berlin');
41
+		return $apiEndPoint;
42
+	}
43
+	function getPayload()
44
+	{
45
+		if($this->version == 'v3')
46
+		{
47
+			$this->location = new Location();
48
+			$this->location->setLat(52.520006);
49
+			$this->location->setLng(13.404954);
50
+			$this->location->setCityName('Berlin');
51 51
 
52 52
 
53
-            return array(
54
-                "location" => $this->location->toArray(),
55
-                "stickies" => 'false',
56
-            );
57
-        }
58
-        else
59
-        {
60
-            return array(
61
-            );
62
-        }
63
-    }
64
-    function getMethod()
65
-    {
66
-        return 'GET';
67
-    }
53
+			return array(
54
+				"location" => $this->location->toArray(),
55
+				"stickies" => 'false',
56
+			);
57
+		}
58
+		else
59
+		{
60
+			return array(
61
+			);
62
+		}
63
+	}
64
+	function getMethod()
65
+	{
66
+		return 'GET';
67
+	}
68 68
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,22 +11,22 @@  discard block
 block discarded – undo
11 11
     public $url;
12 12
 
13 13
         
14
-    function setUrl ($url)
14
+    function setUrl($url)
15 15
     {
16 16
             $this->url = $url;
17 17
     }
18 18
     
19
-    function getUrl ()
19
+    function getUrl()
20 20
     {
21 21
         return $this->url;
22 22
     }
23 23
 		
24
-    function setLastPostId ($lastPostId)
24
+    function setLastPostId($lastPostId)
25 25
     {
26 26
 			$this->lastPostId = $lastPostId;
27 27
 	}
28 28
 	
29
-	function getlastPostId ()
29
+	function getlastPostId()
30 30
 	{
31 31
 		return $this->lastPostId;
32 32
 	}
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $apiEndPoint = $this->getUrl();
37 37
 
38
-        if ($this->getLastPostId() != "") {
38
+        if($this->getLastPostId() != "") {
39 39
 			$apiEndPoint = $this->getUrl() . '?after=' . $this->getLastPostId();
40 40
 		}
41 41
         return $apiEndPoint;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,8 @@
 block discarded – undo
35 35
     {
36 36
         $apiEndPoint = $this->getUrl();
37 37
 
38
-        if ($this->getLastPostId() != "") {
38
+        if ($this->getLastPostId() != "")
39
+        {
39 40
 			$apiEndPoint = $this->getUrl() . '?after=' . $this->getLastPostId();
40 41
 		}
41 42
         return $apiEndPoint;
Please login to merge, or discard this patch.