Completed
Push — master ( 01a5f0...30d428 )
by Costin
02:01
created
src/2parale.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 	 */
43 43
 	private function makeRequest($method, $args = array()) {
44 44
 
45
-		$url = $this->api_endpoint . '/' . $method . '.json';
45
+		$url = $this->api_endpoint.'/'.$method.'.json';
46 46
 
47 47
 		if (function_exists('curl_init') && function_exists('curl_setopt')) {
48 48
 			$ch = curl_init();
49 49
 			curl_setopt($ch, CURLOPT_URL, $url);
50
-			curl_setopt($ch, CURLOPT_USERPWD, $this->username . ":" . $this->password);
50
+			curl_setopt($ch, CURLOPT_USERPWD, $this->username.":".$this->password);
51 51
 			curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
52
-			curl_setopt($ch, CURLOPT_USERAGENT, "2Parale-" . $this->api_version);
52
+			curl_setopt($ch, CURLOPT_USERAGENT, "2Parale-".$this->api_version);
53 53
 			curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
54 54
 			curl_setopt($ch, CURLOPT_TIMEOUT, 10);
55 55
 			curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verify_ssl);
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
 			$result = file_get_contents($url, null, stream_context_create(array(
65 65
 				'http' => array(
66 66
 					'protocol_version' => 1.1,
67
-					'user_agent' => "2Parale-" . $this->api_version,
67
+					'user_agent' => "2Parale-".$this->api_version,
68 68
 					'method' => 'POST',
69
-					'header' => "Authorization: Basic " . base64_encode($this->username . ':' . $this->password) . "\r\n" .
70
-					"Content-type: application/json\r\n" .
71
-					"Connection: close\r\n" .
72
-					"Content-length: " . strlen($json_data) . "\r\n",
69
+					'header' => "Authorization: Basic ".base64_encode($this->username.':'.$this->password)."\r\n".
70
+					"Content-type: application/json\r\n".
71
+					"Connection: close\r\n".
72
+					"Content-length: ".strlen($json_data)."\r\n",
73 73
 					'content' => $json_data,
74 74
 				),
75 75
 			)));
Please login to merge, or discard this patch.