Completed
Push — master ( 285880...d65ec1 )
by mains
02:43
created
php/DatabaseConnect.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,6 @@
 block discarded – undo
40 40
 			 ) DEFAULT CHARSET=utf8";
41 41
   if(!$db->query($query))
42 42
   {
43
-    throw new Exception($db->error($mysqli));
43
+	throw new Exception($db->error($mysqli));
44 44
   }
45 45
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 
13 13
 }
14 14
 $db = new DatabaseConnect();
15
-if ($db->connect_errno) {
15
+if($db->connect_errno) {
16 16
   echo 'Sorry, die Verbindung zu unserem superfetten endgeilen 
17 17
         Server ist hops gegangen. Wegen '.$db -> connect_error;
18 18
 }
Please login to merge, or discard this patch.
php/Requests/GetKarma.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
3 3
 
4 4
 class GetKarma extends AbstractRequest {
5 5
 		
6
-    function getApiEndPoint()
7
-    {
8
-        return '/v2/users/karma';
9
-    }
10
-    function getPayload()
11
-    {
12
-        return array(
13
-        );
14
-    }
15
-    function getMethod()
16
-    {
17
-        return 'GET';
18
-    }
6
+	function getApiEndPoint()
7
+	{
8
+		return '/v2/users/karma';
9
+	}
10
+	function getPayload()
11
+	{
12
+		return array(
13
+		);
14
+	}
15
+	function getMethod()
16
+	{
17
+		return 'GET';
18
+	}
19 19
 }
20 20
 
Please login to merge, or discard this patch.
php/Requests/GetPosts.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -5,20 +5,20 @@  discard block
 block discarded – undo
5 5
 {
6 6
 	public $lastPostId;
7 7
 
8
-    public $url;
8
+	public $url;
9 9
         
10
-    function setUrl ($url)
11
-    {
12
-            $this->url = $url;
13
-    }
10
+	function setUrl ($url)
11
+	{
12
+			$this->url = $url;
13
+	}
14 14
     
15
-    function getUrl ()
16
-    {
17
-        return $this->url;
18
-    }
15
+	function getUrl ()
16
+	{
17
+		return $this->url;
18
+	}
19 19
 		
20
-    function setLastPostId ($lastPostId)
21
-    {
20
+	function setLastPostId ($lastPostId)
21
+	{
22 22
 			$this->lastPostId = $lastPostId;
23 23
 	}
24 24
 	
@@ -27,22 +27,22 @@  discard block
 block discarded – undo
27 27
 		return $this->lastPostId;
28 28
 	}
29 29
     
30
-    function getApiEndPoint()
31
-    {
32
-        $apiEndPoint = $this->getUrl();
33
-        //echo $GLOBALS['lastPostId'];
34
-        if ($this->getLastPostId() != "") {
30
+	function getApiEndPoint()
31
+	{
32
+		$apiEndPoint = $this->getUrl();
33
+		//echo $GLOBALS['lastPostId'];
34
+		if ($this->getLastPostId() != "") {
35 35
 			$apiEndPoint = $this->getUrl() . '/location/?after=' . $this->getLastPostId();
36 36
 		}
37
-        return $apiEndPoint;
38
-    }
39
-    function getPayload()
40
-    {
41
-        return array(
42
-        );
43
-    }
44
-    function getMethod()
45
-    {
46
-        return 'GET';
47
-    }
37
+		return $apiEndPoint;
38
+	}
39
+	function getPayload()
40
+	{
41
+		return array(
42
+		);
43
+	}
44
+	function getMethod()
45
+	{
46
+		return 'GET';
47
+	}
48 48
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@  discard block
 block discarded – undo
7 7
 
8 8
     public $url;
9 9
         
10
-    function setUrl ($url)
10
+    function setUrl($url)
11 11
     {
12 12
             $this->url = $url;
13 13
     }
14 14
     
15
-    function getUrl ()
15
+    function getUrl()
16 16
     {
17 17
         return $this->url;
18 18
     }
19 19
 		
20
-    function setLastPostId ($lastPostId)
20
+    function setLastPostId($lastPostId)
21 21
     {
22 22
 			$this->lastPostId = $lastPostId;
23 23
 	}
24 24
 	
25
-	function getlastPostId ()
25
+	function getlastPostId()
26 26
 	{
27 27
 		return $this->lastPostId;
28 28
 	}
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $apiEndPoint = $this->getUrl();
33 33
         //echo $GLOBALS['lastPostId'];
34
-        if ($this->getLastPostId() != "") {
34
+        if($this->getLastPostId() != "") {
35 35
 			$apiEndPoint = $this->getUrl() . '/location/?after=' . $this->getLastPostId();
36 36
 		}
37 37
         return $apiEndPoint;
Please login to merge, or discard this patch.
php/Requests/Upvote.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,19 +3,19 @@
 block discarded – undo
3 3
 
4 4
 class Upvote extends AbstractRequest {
5 5
 		
6
-    function getApiEndPoint()
7
-    {
8
-        return '/v2/posts/' . $_GET['postID'] . '/upvote';
9
-    }
10
-    function getPayload()
11
-    {
12
-        return array(
6
+	function getApiEndPoint()
7
+	{
8
+		return '/v2/posts/' . $_GET['postID'] . '/upvote';
9
+	}
10
+	function getPayload()
11
+	{
12
+		return array(
13 13
 					"reason_code" => -1,
14
-        );
15
-    }
16
-    function getMethod()
17
-    {
18
-        return 'PUT';
19
-    }
14
+		);
15
+	}
16
+	function getMethod()
17
+	{
18
+		return 'PUT';
19
+	}
20 20
 }
21 21
 
Please login to merge, or discard this patch.
php/Requests/libary/Requests/Proxy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,5 +31,5 @@
 block discarded – undo
31 31
 	 * @see Requests_Hooks::register
32 32
 	 * @param Requests_Hooks $hooks Hook system
33 33
 	 */
34
-	public function register(Requests_Hooks &$hooks);
34
+	public function register(Requests_Hooks&$hooks);
35 35
 }
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
php/Requests/GetPostDetails.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
3 3
 
4 4
 class GetPostDetails extends AbstractRequest {
5 5
 		
6
-    function getApiEndPoint()
7
-    {
8
-        return '/v2/posts/' . $_GET['postID'];
9
-    }
10
-    function getPayload()
11
-    {
12
-        return array(
13
-        );
14
-    }
15
-    function getMethod()
16
-    {
17
-        return 'GET';
18
-    }
6
+	function getApiEndPoint()
7
+	{
8
+		return '/v2/posts/' . $_GET['postID'];
9
+	}
10
+	function getPayload()
11
+	{
12
+		return array(
13
+		);
14
+	}
15
+	function getMethod()
16
+	{
17
+		return 'GET';
18
+	}
19 19
 }
20 20
 
Please login to merge, or discard this patch.
php/Requests/Downvote.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -3,18 +3,18 @@
 block discarded – undo
3 3
 
4 4
 class Downvote extends AbstractRequest {
5 5
 		
6
-    function getApiEndPoint()
7
-    {
8
-        return '/v2/posts/' . $_GET['postID'] . '/downvote';
9
-    }
10
-    function getPayload()
11
-    {
12
-        return array(
13
-        );
14
-    }
15
-    function getMethod()
16
-    {
17
-        return 'PUT';
18
-    }
6
+	function getApiEndPoint()
7
+	{
8
+		return '/v2/posts/' . $_GET['postID'] . '/downvote';
9
+	}
10
+	function getPayload()
11
+	{
12
+		return array(
13
+		);
14
+	}
15
+	function getMethod()
16
+	{
17
+		return 'PUT';
18
+	}
19 19
 }
20 20
 
Please login to merge, or discard this patch.
php/Location.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-class Location{
3
+class Location {
4 4
 
5 5
     public $cityName;
6 6
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     {
38 38
         $this->lng = $lng;
39 39
     }
40
-    public function toArray(){
40
+    public function toArray() {
41 41
         return array(
42 42
             "city" => $this->getCityName(),
43 43
             "country" => 'DE',
Please login to merge, or discard this patch.
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -2,51 +2,51 @@
 block discarded – undo
2 2
 
3 3
 class Location{
4 4
 
5
-    public $cityName;
6
-
7
-    public $lat;
8
-
9
-    public $lng;
10
-
11
-    public function getCityName()
12
-    {
13
-        return $this->cityName;
14
-    }
15
-
16
-    public function setCityName($cityName)
17
-    {
18
-        $this->cityName = $cityName;
19
-    }
20
-
21
-    public function getLat()
22
-    {
23
-        return $this->lat;
24
-    }
25
-
26
-    public function setLat($lat)
27
-    {
28
-        $this->lat = $lat;
29
-    }
30
-
31
-    public function getLng()
32
-    {
33
-        return $this->lng;
34
-    }
35
-
36
-    public function setLng($lng)
37
-    {
38
-        $this->lng = $lng;
39
-    }
40
-    public function toArray(){
41
-        return array(
42
-            "city" => $this->getCityName(),
43
-            "country" => 'DE',
44
-            "loc_accuracy" => '0.0',
45
-            "loc_coordinates" => array(
46
-                "lat" => $this->getLat(),
47
-                "lng" => $this->getLng(),
48
-            ),
49
-            "name" => $this->getCityName()
50
-        );
51
-    }
5
+	public $cityName;
6
+
7
+	public $lat;
8
+
9
+	public $lng;
10
+
11
+	public function getCityName()
12
+	{
13
+		return $this->cityName;
14
+	}
15
+
16
+	public function setCityName($cityName)
17
+	{
18
+		$this->cityName = $cityName;
19
+	}
20
+
21
+	public function getLat()
22
+	{
23
+		return $this->lat;
24
+	}
25
+
26
+	public function setLat($lat)
27
+	{
28
+		$this->lat = $lat;
29
+	}
30
+
31
+	public function getLng()
32
+	{
33
+		return $this->lng;
34
+	}
35
+
36
+	public function setLng($lng)
37
+	{
38
+		$this->lng = $lng;
39
+	}
40
+	public function toArray(){
41
+		return array(
42
+			"city" => $this->getCityName(),
43
+			"country" => 'DE',
44
+			"loc_accuracy" => '0.0',
45
+			"loc_coordinates" => array(
46
+				"lat" => $this->getLat(),
47
+				"lng" => $this->getLng(),
48
+			),
49
+			"name" => $this->getCityName()
50
+		);
51
+	}
52 52
 }
Please login to merge, or discard this patch.
get-posts-ajax.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 function getPosts($lastPostId, $url) {
21 21
 	$db = new DatabaseConnect();
22
-	if ($db->connect_errno) {
22
+	if($db->connect_errno) {
23 23
 		echo 'Sorry, die Verbindung zu unserem superfetten endgeilen 
24 24
 					Server ist hops gegangen. Wegen '. $db -> connect_error;
25 25
 	}
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	
29 29
 	$access_token;
30 30
 	
31
-	if ($result->num_rows > 0) {
31
+	if($result->num_rows > 0) {
32 32
 			// output data of each row
33 33
 			while($row = $result->fetch_assoc()) {
34 34
 					$access_token = $row["access_token"];
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		?>
77 77
 		<div class="nextPosts">
78 78
 		<?php
79
-		for($i = 0; $i<$loops; $i++) {
79
+		for($i = 0; $i < $loops; $i++) {
80 80
 		
81 81
 			if(isset($posts[$i])) {
82 82
 				$lastPostId = $posts[$i]['post_id'];
@@ -94,24 +94,24 @@  discard block
 block discarded – undo
94 94
 							$timediff_inHours = (string)$timediff->format('%h');
95 95
 							$timediff_inDays = (string)$timediff->format('%d');
96 96
 							$timediff_inMonth = (string)$timediff->format('%m');
97
-							if($timediff_inMonth!=0) {
97
+							if($timediff_inMonth != 0) {
98 98
 									$timediff = $timediff_inMonth . "m";
99 99
 							}
100 100
 							else
101 101
 							{
102
-								if($timediff_inDays!=0)
102
+								if($timediff_inDays != 0)
103 103
 								{
104 104
 									$timediff = $timediff_inDays . "d";
105 105
 								}
106 106
 								else
107 107
 								{
108
-									if($timediff_inHours!=0)
108
+									if($timediff_inHours != 0)
109 109
 									{
110 110
 										$timediff = $timediff_inHours . "h";
111 111
 									}
112 112
 									else
113 113
 									{
114
-										if($timediff_inMinutes!=0)
114
+										if($timediff_inMinutes != 0)
115 115
 										{
116 116
 											$timediff = $timediff_inMinutes . "m";
117 117
 										}
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 							}
125 125
 						?>
126 126
 
127
-				<article class="jodel" style="background-color: #<?php echo $posts[$i]["color"];?>;">
127
+				<article class="jodel" style="background-color: #<?php echo $posts[$i]["color"]; ?>;">
128 128
 					<content>
129 129
 						<?php 
130 130
 						if(isset($posts[$i]["image_url"])) {
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
 						?>
137 137
 					</content>
138 138
 					<aside>
139
-						<a href="index.php?vote=up&postID=<?php echo $posts[$i]["post_id"];?>">
139
+						<a href="index.php?vote=up&postID=<?php echo $posts[$i]["post_id"]; ?>">
140 140
 							<i class="fa fa-angle-up fa-3x"></i>
141 141
 						</a>	
142 142
 							<br />
143
-						<?php echo $posts[$i]["vote_count"];?><br />
144
-						<a href="index.php?vote=down&postID=<?php echo $posts[$i]["post_id"];?>">
143
+						<?php echo $posts[$i]["vote_count"]; ?><br />
144
+						<a href="index.php?vote=down&postID=<?php echo $posts[$i]["post_id"]; ?>">
145 145
 							<i class="fa fa-angle-down fa-3x"></i>
146 146
 						</a>
147 147
 					</aside>
@@ -152,13 +152,13 @@  discard block
 block discarded – undo
152 152
 								<td class="time">
153 153
 									<span data-tooltip="Time">
154 154
 										<i class="fa fa-clock-o"></i>
155
-										<?php echo $timediff;?>
155
+										<?php echo $timediff; ?>
156 156
 									</span> 
157 157
 								</td>
158 158
 								<td class="comments">
159 159
 									<?php if($showCommentIcon) {?>
160 160
 									<span data-tooltip="Comments">
161
-										<a href="index.php?getPostDetails=true&postID=<?php echo $posts[$i]["post_id"];?>">
161
+										<a href="index.php?getPostDetails=true&postID=<?php echo $posts[$i]["post_id"]; ?>">
162 162
 											<i class="fa fa-commenting-o"></i>
163 163
 											<?php if(array_key_exists("child_count", $posts[$i])) {
164 164
 														echo $posts[$i]["child_count"];
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 								<td class="distance">
172 172
 									<span data-tooltip="Distance">
173 173
 										<i class="fa fa-map-marker"></i>
174
-										<?php echo $posts[$i]["distance"];?> km
174
+										<?php echo $posts[$i]["distance"]; ?> km
175 175
 									</span>
176 176
 								</td>
177 177
 							</tr>
Please login to merge, or discard this patch.