Completed
Branch master (43b476)
by Robert
13:50
created
src/Communique.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 * @return \Communique\RESTClientResponse  REST response encapsulation object
97 97
 	 */
98 98
 	public function get($url, $payload = array(), array $headers = array(), $debug = null) {
99
-		$request = new \Communique\RESTClientRequest('get', $this->_BASE_URL . $url, $payload, $headers);
99
+		$request = new \Communique\RESTClientRequest('get', $this->_BASE_URL.$url, $payload, $headers);
100 100
 		return $this->_call($request, $debug);
101 101
 	}
102 102
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	 * @return \Communique\RESTClientResponse  REST response encapsulation object
111 111
 	 */
112 112
 	public function put($url, $payload, array $headers = array(), $debug = null) {
113
-		$request = new \Communique\RESTClientRequest('put', $this->_BASE_URL . $url, $payload, $headers);
113
+		$request = new \Communique\RESTClientRequest('put', $this->_BASE_URL.$url, $payload, $headers);
114 114
 		return $this->_call($request, $debug);
115 115
 	}
116 116
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 	 * @return \Communique\RESTClientResponse  REST response encapsulation object
125 125
 	 */
126 126
 	public function post($url, $payload, array $headers = array(), $debug = null) {
127
-		$request = new \Communique\RESTClientRequest('post', $this->_BASE_URL . $url, $payload, $headers);
127
+		$request = new \Communique\RESTClientRequest('post', $this->_BASE_URL.$url, $payload, $headers);
128 128
 		return $this->_call($request, $debug);
129 129
 	}
130 130
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 * @return \Communique\RESTClientResponse  REST response encapsulation object
139 139
 	 */
140 140
 	public function delete($url, $payload = array(), array $headers = array(), $debug = null) {
141
-		$request = new \Communique\RESTClientRequest('delete', $this->_BASE_URL . $url, $payload, $headers);
141
+		$request = new \Communique\RESTClientRequest('delete', $this->_BASE_URL.$url, $payload, $headers);
142 142
 		return $this->_call($request, $debug);
143 143
 	}
144 144
 }
145 145
\ No newline at end of file
Please login to merge, or discard this patch.
src/CurlHTTPClient.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	public function request(\Communique\RESTClientRequest $request) {
51 51
 		$headers = array();
52 52
 		foreach ($request->headers as $header_key => $header_value) {
53
-			$headers[] = $header_key . ': ' . $header_value;
53
+			$headers[] = $header_key.': '.$header_value;
54 54
 		}
55 55
 
56 56
 		$this->curl->setopt_array(array(
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
 
84 84
 			case 'DELETE':
85 85
 				if ($payload = http_build_query($request->payload)) {
86
-					$payload = '?' . $payload;
86
+					$payload = '?'.$payload;
87 87
 				} else {
88 88
 					$payload = '';
89 89
 				}
90 90
 				$this->curl->setopt_array(
91 91
 					array(
92 92
 						CURLOPT_CUSTOMREQUEST => 'DELETE',
93
-						CURLOPT_URL => $request->url . $payload
93
+						CURLOPT_URL => $request->url.$payload
94 94
 					)
95 95
 				);
96 96
 			break;
@@ -98,14 +98,14 @@  discard block
 block discarded – undo
98 98
 			default:
99 99
 			case 'GET':
100 100
 				if ($payload = http_build_query($request->payload)) {
101
-					$payload = '?' . $payload;
101
+					$payload = '?'.$payload;
102 102
 				} else {
103 103
 					$payload = '';
104 104
 				}
105 105
 				$this->curl->setopt_array(
106 106
 					array(
107 107
 						CURLOPT_HTTPGET => true,
108
-						CURLOPT_URL => $request->url . $payload
108
+						CURLOPT_URL => $request->url.$payload
109 109
 					)
110 110
 				);
111 111
 			break;
@@ -123,15 +123,15 @@  discard block
 block discarded – undo
123 123
 				case CURLE_SSL_CIPHER:
124 124
 				case CURLE_SSL_CACERT:
125 125
 				case CURLE_SSL_CONNECT_ERROR:
126
-					throw new \Communique\CommuniqueRESTSSLException('cURL SSL Error: ' . $this->curl->error() . ' cURL Error Code: ' . $curl_error);
126
+					throw new \Communique\CommuniqueRESTSSLException('cURL SSL Error: '.$this->curl->error().' cURL Error Code: '.$curl_error);
127 127
 
128 128
 				case CURLE_UNSUPPORTED_PROTOCOL:
129 129
 				case CURLE_COULDNT_CONNECT:
130 130
 				case CURLE_COULDNT_RESOLVE_HOST:
131
-					throw new \Communique\CommuniqueRESTConnectionException('cURL Error: ' . $this->curl->error() . ' cURL Error Code: ' . $curl_error);
131
+					throw new \Communique\CommuniqueRESTConnectionException('cURL Error: '.$this->curl->error().' cURL Error Code: '.$curl_error);
132 132
 
133 133
 				default:
134
-					throw new \Communique\CommuniqueRESTException('cURL Error: ' . $this->curl->error() . ' cURL Error Code: ' . $curl_error);
134
+					throw new \Communique\CommuniqueRESTException('cURL Error: '.$this->curl->error().' cURL Error Code: '.$curl_error);
135 135
 			}
136 136
 		} else {
137 137
 			return new \Communique\RESTClientResponse(
Please login to merge, or discard this patch.
src/Curl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 	 */
35 35
 	public function __construct() {
36 36
 		if (!extension_loaded('curl')) {
37
-			throw new \Communique\CommuniqueRESTConnectionException('cURL Error: ' . $this->error() . ' cURL Error Code: ' . $this->errno());
37
+			throw new \Communique\CommuniqueRESTConnectionException('cURL Error: '.$this->error().' cURL Error Code: '.$this->errno());
38 38
 		} else {
39 39
 			$this->_ch = curl_init();
40 40
 			$this->setopt(CURLOPT_CAINFO, \Kdyby\CurlCaBundle\CertificateHelper::getCaInfoFile());
Please login to merge, or discard this patch.