Passed
Push — master ( 422c77...7dd238 )
by Haridarshan
02:20
created
src/Instagram.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -130,13 +130,13 @@  discard block
 block discarded – undo
130 130
 	}
131 131
 	
132 132
 	/**
133
-	* Make URLs for user browser navigation.
134
-	*
135
-	* @param string $path
136
-	* @param array  $parameters
137
-	*
138
-	* @return string
139
-	*/
133
+	 * Make URLs for user browser navigation.
134
+	 *
135
+	 * @param string $path
136
+	 * @param array  $parameters
137
+	 *
138
+	 * @return string
139
+	 */
140 140
 	public function getUrl($path, array $parameters) {		
141 141
 		if (is_array($parameters)) {			
142 142
 			if (isset($parameters['scope']) and count(array_diff($parameters['scope'], $this->default_scopes)) === 0) {
@@ -437,19 +437,19 @@  discard block
 block discarded – undo
437 437
 	*
438 438
 	* @return void
439 439
 	*/
440
-    private function setAccessToken($data) {		
441
-        $token = is_object($data) ? $data->access_token : $data;
442
-        $this->access_token = $token;
443
-    }
440
+	private function setAccessToken($data) {		
441
+		$token = is_object($data) ? $data->access_token : $data;
442
+		$this->access_token = $token;
443
+	}
444 444
 	
445 445
 	/*
446 446
 	* Getter: User Access Token
447 447
 	*
448 448
 	* @return string
449 449
 	*/
450
-    private function getAccessToken() {
451
-        return $this->access_token;
452
-    }
450
+	private function getAccessToken() {
451
+		return $this->access_token;
452
+	}
453 453
 		
454 454
 	/*
455 455
 	* Get a string containing the version of the library.
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 				throw new InstagramException("Missing or Invalid Scope permission used");
146 146
 			}
147 147
 			
148
-			$query = 'client_id='. $this->getClientId() .'&redirect_uri='. urlencode($this->getCallbackUrl()) .'&response_type=code';
148
+			$query = 'client_id='.$this->getClientId().'&redirect_uri='.urlencode($this->getCallbackUrl()).'&response_type=code';
149 149
 			
150 150
 			if (isset($this->scopes)) {
151 151
 				$scope = urlencode(str_replace(",", " ", implode(",", $parameters['scope'])));
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 		$this->execute($path, $options, 'POST');
185 185
 		
186 186
 		if (isset($this->response->code)) {
187
-			throw new InstagramException("return status code: ". $this->response->code ." type: ". $this->response->error_type ." message: ". $this->response->error_message );
187
+			throw new InstagramException("return status code: ".$this->response->code." type: ".$this->response->error_type." message: ".$this->response->error_message);
188 188
 		}
189 189
 				
190 190
 		$this->setAccessToken($this->response);
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 		$signature = $endpoint;
274 274
 		ksort($params);
275 275
 		
276
-		foreach($params as $key => $value) {
276
+		foreach ($params as $key => $value) {
277 277
 			$signature .= "|$key=$value";	
278 278
 		}
279 279
 					
@@ -304,16 +304,16 @@  discard block
 block discarded – undo
304 304
 					exit();
305 305
 				}
306 306
 				
307
-				$authentication_method = '?access_token=' . $this->access_token;
307
+				$authentication_method = '?access_token='.$this->access_token;
308 308
 				// Need to remove the access_token from $params array
309 309
 				unset($params['access_token']);				
310 310
 			} else {
311
-				$authentication_method = '?client_id=' . $this->getClientId();
311
+				$authentication_method = '?client_id='.$this->getClientId();
312 312
 				
313 313
 				$param = null;
314 314
 				
315 315
 				if (isset($params) and is_array($params)) {
316
-					$param = '&' . http_build_query($params);	
316
+					$param = '&'.http_build_query($params);	
317 317
 				}
318 318
 			}
319 319
 			
@@ -321,13 +321,13 @@  discard block
 block discarded – undo
321 321
 			$param = null;
322 322
 				
323 323
 			if (isset($params) and is_array($params)) {
324
-				$param = '&' . http_build_query($params);	
324
+				$param = '&'.http_build_query($params);	
325 325
 			}
326 326
 			
327
-			$endpoint = self::API_VERSION. $path . $authentication_method . (('GET' === $method) ? $param : null);
327
+			$endpoint = self::API_VERSION.$path.$authentication_method.(('GET' === $method) ? $param : null);
328 328
 			
329 329
 			if ($this->secure) {
330
-				$endpoint .= (strstr($endpoint, '?') ? '&' : '?') . 'sig=' . $this->secureRequest($path, $authentication_method, $data);
330
+				$endpoint .= (strstr($endpoint, '?') ? '&' : '?').'sig='.$this->secureRequest($path, $authentication_method, $data);
331 331
 			}
332 332
 						
333 333
 			$this->execute($endpoint, $data);
Please login to merge, or discard this patch.